@@ -84,7 +84,6 @@ class StreamingAnextTestSuite:
8484 'test_stop_async_iteration_finalizes_and_reads_metadata' ,
8585 'test_couchbase_exception_propagates_unchanged' ,
8686 'test_generic_exception_converted_to_internal' ,
87- 'test_queue_empty_converted_with_op_name' ,
8887 'test_keyboard_interrupt_propagates_unconverted' ,
8988 'test_cancellation_finalizes_and_propagates' ,
9089 'test_finalize_cancels_streaming_result_on_error' ,
@@ -95,7 +94,7 @@ class StreamingAnextTestSuite:
9594 async def test_returns_row_and_ends_span (self ):
9695 req = _FakeAsyncStreamingRequest (asyncio .get_running_loop (), rows = ['row-1' ])
9796 try :
98- row = await stream_anext (req , 'N1QL' )
97+ row = await stream_anext (req )
9998 assert row == 'row-1'
10099 # span ended on the (first) row, no error, and the op is NOT finalized mid-stream
101100 assert req .process_core_span_calls == [None ]
@@ -108,7 +107,7 @@ async def test_returns_row_and_ends_span(self):
108107 async def test_stop_async_iteration_finalizes_and_reads_metadata (self ):
109108 req = _FakeAsyncStreamingRequest (asyncio .get_running_loop (), rows = [])
110109 with pytest .raises (StopAsyncIteration ):
111- await stream_anext (req , 'N1QL' )
110+ await stream_anext (req )
112111 assert req ._done_streaming is True
113112 assert req .finalize_calls == [None ]
114113 assert req .get_metadata_calls == 1
@@ -119,7 +118,7 @@ async def test_couchbase_exception_propagates_unchanged(self):
119118 err = CouchbaseException ('boom' )
120119 req = _FakeAsyncStreamingRequest (asyncio .get_running_loop (), raise_exc = err )
121120 with pytest .raises (CouchbaseException ) as exc_info :
122- await stream_anext (req , 'N1QL' )
121+ await stream_anext (req )
123122 assert exc_info .value is err
124123 assert req .finalize_calls == [err ]
125124 assert req .executor_shutdown is True
@@ -128,25 +127,16 @@ async def test_couchbase_exception_propagates_unchanged(self):
128127 async def test_generic_exception_converted_to_internal (self ):
129128 req = _FakeAsyncStreamingRequest (asyncio .get_running_loop (), raise_exc = ValueError ('bad' ))
130129 with pytest .raises (InternalSDKException ):
131- await stream_anext (req , 'N1QL' )
130+ await stream_anext (req )
132131 assert len (req .finalize_calls ) == 1
133132 assert isinstance (req .finalize_calls [0 ], InternalSDKException )
134133 assert req .executor_shutdown is True
135134
136- @pytest .mark .asyncio
137- async def test_queue_empty_converted_with_op_name (self ):
138- req = _FakeAsyncStreamingRequest (asyncio .get_running_loop (), raise_exc = asyncio .QueueEmpty ())
139- with pytest .raises (InternalSDKException ) as exc_info :
140- await stream_anext (req , 'Analytics' )
141- assert 'Analytics' in str (exc_info .value )
142- assert len (req .finalize_calls ) == 1
143- assert req .executor_shutdown is True
144-
145135 @pytest .mark .asyncio
146136 async def test_keyboard_interrupt_propagates_unconverted (self ):
147137 req = _FakeAsyncStreamingRequest (asyncio .get_running_loop (), raise_exc = KeyboardInterrupt ())
148138 with pytest .raises (KeyboardInterrupt ):
149- await stream_anext (req , 'N1QL' )
139+ await stream_anext (req )
150140 # BaseException must be finalized for cleanup but NOT converted to a CouchbaseException
151141 assert len (req .finalize_calls ) == 1
152142 assert isinstance (req .finalize_calls [0 ], KeyboardInterrupt )
@@ -157,7 +147,7 @@ async def test_cancellation_finalizes_and_propagates(self):
157147 # The core scenario: a task cancelled while blocked fetching the next row.
158148 block = threading .Event ()
159149 req = _FakeAsyncStreamingRequest (asyncio .get_running_loop (), rows = ['late-row' ], block_event = block )
160- task = asyncio .ensure_future (stream_anext (req , 'N1QL' ))
150+ task = asyncio .ensure_future (stream_anext (req ))
161151 # let the task reach the run_in_executor await (worker is now blocked on the event)
162152 await asyncio .sleep (0.05 )
163153 task .cancel ()
0 commit comments