File tree Expand file tree Collapse file tree
src/test/java/com/coreoz/wisp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,13 +117,13 @@ public void run() {
117117
118118 scheduler .cancel (job2 .name ()).toCompletableFuture ().get (1 , TimeUnit .SECONDS );
119119
120- Thread .sleep (30 );
120+ Thread .sleep (60 );
121121 scheduler .gracefullyShutdown ();
122122
123123 assertThat (job2 .executionsCount ()).isEqualTo (1 );
124124 assertThat (jobProcess2 .countExecuted .get ()).isEqualTo (1 );
125- // after job 2 is cancelled, job 1 should have been executed at least 5 times
126- assertThat (job1 .executionsCount ()).isGreaterThan (job1ExecutionsCount + 5 );
125+ // after job 2 is cancelled, job 1 should have been executed at least 3 times
126+ assertThat (job1 .executionsCount ()).isGreaterThan (job1ExecutionsCount + 3 );
127127 }
128128
129129 @ Test
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public void thread_pool_should_scale_down_when_no_more_tasks_need_executing() th
2626 scheduler .cancel ("job1" );
2727 scheduler .cancel ("job2" );
2828
29- Thread .sleep (60L );
29+ Thread .sleep (80L );
3030 SchedulerStats stats = scheduler .stats ();
3131 scheduler .gracefullyShutdown ();
3232
You can’t perform that action at this time.
0 commit comments