1
0
mirror of https://github.com/square/okhttp.git synced 2026-01-12 10:23:16 +03:00

Prevent flaky tests by adding sleep in HttpOverHttp2Test (#9250)

Added a sleep to avoid flaky race conditions in test.
This commit is contained in:
Yuri Schimke
2026-01-11 14:38:57 +00:00
committed by GitHub
parent 7c4b35ba27
commit 6b4823392b

View File

@@ -1215,6 +1215,8 @@ class HttpOverHttp2Test(
.isEqualTo(expectedSequenceNumber)
responseDequeuedLatch!!.await()
call.cancel()
// Avoid flaky race conditions
Thread.sleep(100)
requestCanceledLatch!!.countDown()
latch.await()
}