TUN-4089: Address flakiness in component tests for termination

This commit is contained in:
cthuang
2021-03-16 10:39:58 +00:00
parent 39901e1d60
commit d67fbbf94f
2 changed files with 8 additions and 4 deletions

View File

@@ -50,9 +50,9 @@ class TestTermination():
target=self.stream_request, args=(config, connected, True, ))
in_flight_req.start()
with connected:
connected.wait(self.timeout)
with self.within_grace_period():
with connected:
connected.wait(self.timeout)
# Send signal after the SSE connection is established
self.terminate_by_signal(cloudflared, sig)
self.wait_eyeball_thread(in_flight_req, self.grace_period)