Skip to content

Commit 9b1fe75

Browse files
committed
chore: fix test that was waiting before initiating operation
1 parent 93a8e5a commit 9b1fe75

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/unit/test_bidi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -828,11 +828,13 @@ def test_rpc_callback_fires_when_consumer_start_fails(self):
828828
bidi_rpc._start_rpc.side_effect = expected_exception
829829

830830
consumer = bidi.BackgroundConsumer(bidi_rpc, on_response=None)
831+
832+
consumer.start()
833+
831834
# Wait for the consumer's thread to exit.
832835
while consumer.is_active:
833836
pass
834837

835-
consumer.start()
836838
assert callback.call_args.args[0] == grpc.StatusCode.INVALID_ARGUMENT
837839

838840
def test_consumer_expected_error(self, caplog):

0 commit comments

Comments
 (0)