Skip to content

Commit

Permalink
Make task tests even more robust
Browse files Browse the repository at this point in the history
By tweaking the details.
  • Loading branch information
mederly committed Mar 20, 2018
1 parent 4aea5cd commit e7a50e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Expand Up @@ -230,6 +230,7 @@ public void test110CreateWorkersRecurring() throws Exception {

assertEquals("Wrong execution status of coordinator", TaskExecutionStatus.SUSPENDED,
coordinatorTask.getExecutionStatus());
// in very slow environments the coordinator could be started in the meanwhile, so here the state could be WAITING
assertEquals("Wrong state-before-suspend of coordinator", TaskExecutionStatusType.RUNNABLE,
coordinatorTask.getStateBeforeSuspend());
assertEquals("Wrong execution status of worker", TaskExecutionStatus.CLOSED, worker.getExecutionStatus());
Expand Down Expand Up @@ -272,8 +273,8 @@ public void test110CreateWorkersRecurring() throws Exception {
assertEquals("Wrong execution status of coordinator", TaskExecutionStatus.SUSPENDED,
coordinatorTask.getExecutionStatus());
// in theory, the execution could be 'after' at this time; so this assertion might fail
assertEquals("Wrong state-before-suspend of coordinator", TaskExecutionStatusType.WAITING,
coordinatorTask.getStateBeforeSuspend());
//assertEquals("Wrong state-before-suspend of coordinator", TaskExecutionStatusType.WAITING,
// coordinatorTask.getStateBeforeSuspend());
assertEquals("Wrong execution status of worker", TaskExecutionStatus.SUSPENDED, worker.getExecutionStatus());
assertEquals("Wrong state-before-suspend of worker", TaskExecutionStatusType.RUNNABLE,
worker.getStateBeforeSuspend());
Expand Down
Expand Up @@ -45,6 +45,6 @@
<recurrence>recurring</recurrence>
<binding>loose</binding>
<schedule>
<interval>3</interval>
<interval>10</interval>
</schedule>
</task>

0 comments on commit e7a50e4

Please sign in to comment.