Skip to content

Commit cc5cb25

Browse files
committed
Disable testing upper bounds on waiting time
1 parent 7d1d5cd commit cc5cb25

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

shared/src/test/scala/TaskScheduleBehavior.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class TaskScheduleBehavior extends munit.FunSuite {
2828
f.awaitResult
2929
assertEquals(i, 3)
3030
m.assertTimeAtLeast(200)
31-
m.assertTimeLessThan(300)
31+
// m.assertTimeLessThan(300) // testing upper bound on wait time is flaky
3232
}
3333

3434
test("Exponential backoff(2) 50ms, 5 times total schedule") {
@@ -41,7 +41,7 @@ class TaskScheduleBehavior extends munit.FunSuite {
4141
f.awaitResult
4242
assertEquals(i, 5)
4343
m.assertTimeAtLeast(50 + 100 + 200 + 400)
44-
m.assertTimeLessThan(50 + 100 + 200 + 400 + 800)
44+
// m.assertTimeLessThan(50 + 100 + 200 + 400 + 800) // testing upper bound on wait time is flaky
4545
}
4646

4747
test("Fibonacci backoff 10ms, 6 times total schedule") {
@@ -54,7 +54,7 @@ class TaskScheduleBehavior extends munit.FunSuite {
5454
f.awaitResult
5555
assertEquals(i, 6)
5656
m.assertTimeAtLeast(0 + 10 + 10 + 20 + 30 + 50)
57-
m.assertTimeLessThan(0 + 10 + 10 + 20 + 30 + 50 + 80)
57+
// m.assertTimeLessThan(0 + 10 + 10 + 20 + 30 + 50 + 80) // testing upper bound on wait time is flaky
5858
}
5959

6060
test("UntilSuccess 150ms") {
@@ -70,7 +70,7 @@ class TaskScheduleBehavior extends munit.FunSuite {
7070
val ret = t.schedule(TaskSchedule.RepeatUntilSuccess(150)).start().awaitResult
7171
assertEquals(ret.get.get, 4)
7272
m.assertTimeAtLeast(4 * 150)
73-
m.assertTimeLessThan(5 * 150)
73+
// m.assertTimeLessThan(5 * 150) // testing upper bound on wait time is flaky
7474
}
7575

7676
test("UntilFailure 150ms") {
@@ -87,7 +87,7 @@ class TaskScheduleBehavior extends munit.FunSuite {
8787
val ret = t.schedule(TaskSchedule.RepeatUntilFailure(150)).start().awaitResult
8888
assertEquals(ret.get, Failure(ex))
8989
m.assertTimeAtLeast(4 * 150)
90-
m.assertTimeLessThan(5 * 150)
90+
// m.assertTimeLessThan(5 * 150) // testing upper bound on wait time is flaky
9191
}
9292

9393
}

0 commit comments

Comments
 (0)