Skip to content

Commit

Permalink
try to stabilized unit tests for GH actions
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
  • Loading branch information
thjaeckle committed Jul 28, 2022
1 parent d99e1f4 commit 0a1555e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ public void successfullyAcknowledgeMqttPublish() {

inboundMappingSinkElementReceiver.expectMsg(onCompleteMessage);
underTestWatcher.expectTerminated(underTest);
Mockito.verify(mqtt5Publish, Mockito.timeout(1_000L)).acknowledge();
Mockito.verify(mqtt5Publish, Mockito.timeout(5_000L)).acknowledge();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,12 +476,11 @@ public void manageConnectionWith2Clients() throws Exception {
testProbe.expectMsgClass(OpenConnectionResponse.class);

// forward signal once
underTest.tell(CreateSubscription.of(DittoHeaders.newBuilder()
final CreateSubscription createSubscription = CreateSubscription.of(DittoHeaders.newBuilder()
.putHeader(DittoHeaderDefinition.DITTO_SUDO.getKey(), "true")
.build()), testProbe.ref());
clientActorProbe.fishForMessage(scala.concurrent.duration.Duration.apply(30, TimeUnit.SECONDS),
"CreateSubscription",
PartialFunction.fromFunction(CreateSubscription.class::isInstance));
.build());
underTest.tell(createSubscription, testProbe.ref());
clientActorProbe.expectMsgClass(CreateSubscription.class);

// close connection: at least 1 client actor gets the command; the other may or may not be started.
underTest.tell(closeConnection, testProbe.ref());
Expand Down

0 comments on commit 0a1555e

Please sign in to comment.