MCPcopy Index your code
hub / github.com/github/copilot-sdk / test_read_exact_exceeds_64kb

Method test_read_exact_exceeds_64kb

python/test_jsonrpc.py:122–136  ·  view source on GitHub ↗

Test reading data that exceeds 64KB (triggers the bug without fix)

(self)

Source from the content-addressed store, hash-verified

120 assert len(result) == 65536
121
122 def test_read_exact_exceeds_64kb(self):
123 """Test reading data that exceeds 64KB (triggers the bug without fix)"""
124 # 80KB - larger than typical pipe buffer
125 content = b"z" * 81920
126 # Simulate reading with 64KB limit (macOS pipe buffer)
127 mock_stream = ShortReadStream(content, chunk_size=65536)
128
129 process = MockProcess()
130 process.stdout = mock_stream
131
132 client = JsonRpcClient(process)
133 result = client._read_exact(len(content))
134
135 assert result == content
136 assert len(result) == 81920
137
138 def test_read_exact_empty_stream_raises_eof(self):
139 """Test that reading from closed stream raises EOFError"""

Callers

nothing calls this directly

Calls 4

_read_exactMethod · 0.95
JsonRpcClientClass · 0.90
ShortReadStreamClass · 0.85
MockProcessClass · 0.85

Tested by

no test coverage detected