Skip to content

Commit

Permalink
Fix potential case where the tests would wait forever (#2875)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbonnin committed Jan 19, 2021
1 parent d999d08 commit 4bfb68b
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -84,7 +84,7 @@ class ApolloCancelCallTest {
val start = System.currentTimeMillis()
while (true) {
val timeoutMillis = TimeUnit.MILLISECONDS.convert(timeoutDuration, unit) - (System.currentTimeMillis() - start)
if (timeoutMillis < 0) {
if (timeoutMillis <= 0) {
throw TimeoutException("Timeout reached")
}
if (completed) {
Expand Down Expand Up @@ -128,7 +128,7 @@ class ApolloCancelCallTest {
val start = System.currentTimeMillis()
while (true) {
val timeoutMillis = TimeUnit.MILLISECONDS.convert(timeoutDuration, unit) - (System.currentTimeMillis() - start)
if (timeoutMillis < 0) {
if (timeoutMillis <= 0) {
throw TimeoutException("Timeout reached")
}
if (completed) {
Expand Down

0 comments on commit 4bfb68b

Please sign in to comment.