Skip to content

Commit 4751cb8

Browse files
committed
Add Service Executor Start and Wake State Test
1 parent d0e0d87 commit 4751cb8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

queue-based-load-leveling/src/test/java/com/iluwatar/queue/load/leveling/TaskGenSrvExeTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@
2424
*/
2525
package com.iluwatar.queue.load.leveling;
2626

27+
import static java.util.concurrent.CompletableFuture.anyOf;
2728
import static org.junit.jupiter.api.Assertions.assertEquals;
2829
import static org.junit.jupiter.api.Assertions.assertNotNull;
30+
import static org.junit.jupiter.api.Assertions.assertTrue;
2931

3032
import lombok.extern.slf4j.Slf4j;
3133
import org.junit.jupiter.api.Test;
@@ -84,7 +86,8 @@ void serviceExecutorWakeStateTest() throws InterruptedException {
8486
}
8587
var srvExeState = srvExeThr.getState();
8688
LOGGER.info("Current Service Executor State: " + srvExeState);
87-
assertEquals(srvExeState, Thread.State.RUNNABLE);
89+
// assert that state changes from waiting
90+
assertTrue(srvExeState != Thread.State.WAITING);
8891

8992
}
9093

0 commit comments

Comments
 (0)