Skip to content

Commit 3e99442

Browse files
committed
Fix test cases
1 parent 31f0996 commit 3e99442

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

tests/src/test/scala/org/apache/openwhisk/core/scheduler/queue/test/MemoryQueueTests.scala

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -654,13 +654,14 @@ class MemoryQueueTests
654654
fsm ! StateTimeout
655655
expectMsg(Transition(fsm, Idle, Removed))
656656
queueRef.queue.length shouldBe 0
657+
parent.expectMsg(queueRemovedMsg)
658+
657659
fsm ! message
658660

659661
// queue is timed out again in the Removed state.
660662
parent.expectMsg(message)
661663

662664
fsm ! StateTimeout
663-
parent.expectMsg(queueRemovedMsg)
664665

665666
expectNoMessage()
666667

@@ -1103,10 +1104,7 @@ class MemoryQueueTests
11031104
fsm ! message
11041105
probe.expectMsg(ActivationResponse.developerError("nonExecutbleAction error"))
11051106

1106-
parent.expectMsgAnyOf(
1107-
2 * queueConfig.flushGrace + 5.seconds,
1108-
QueueRemoved(testInvocationNamespace, fqn.toDocId.asDocInfo(action.rev), Some(leaderKey)),
1109-
Transition(fsm, Flushing, Removed))
1107+
parent.expectMsgAllOf(2 * queueConfig.flushGrace + 5.seconds, queueRemovedMsg, Transition(fsm, Flushing, Removed))
11101108

11111109
fsm ! StateTimeout
11121110
parent.expectMsg(queueRemovedMsg)
@@ -1409,10 +1407,7 @@ class MemoryQueueTests
14091407

14101408
val duration = FiniteDuration(queueConfig.maxBlackboxRetentionMs, MILLISECONDS) + queueConfig.flushGrace
14111409
probe.expectMsg(duration, ActivationResponse.whiskError("no available invokers"))
1412-
parent.expectMsgAnyOf(
1413-
duration,
1414-
QueueRemoved(testInvocationNamespace, fqn.toDocId.asDocInfo(action.rev), Some(leaderKey)),
1415-
Transition(fsm, Flushing, Removed))
1410+
parent.expectMsgAllOf(duration, queueRemovedMsg, Transition(fsm, Flushing, Removed))
14161411
fsm ! QueueRemovedCompleted
14171412
parent.expectTerminated(fsm)
14181413

0 commit comments

Comments
 (0)