Skip to content

Commit

Permalink
stabilize unit test
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 May 19, 2022
1 parent bd7d2d9 commit 6bbc972
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -243,16 +243,16 @@ public void correlationIdSameAfterResponseSuccessful() {

// Second message right after the response for the first was sent, should have the same correlation-id (Not suffixed).
supervisor.tell(readResponse, getRef());
final RetrieveThingResponse retrieveThingResponse =
TestSetup.fishForMsgClass(this, RetrieveThingResponse.class);
final RetrieveThingResponse retrieveThingResponse = expectMsgClass(RetrieveThingResponse.class);
assertThat(retrieveThingResponse.getDittoHeaders().getCorrelationId()).isEqualTo(
read.getDittoHeaders().getCorrelationId());

supervisor.tell(read, getRef());

expectPubsubLiveCommandPublish("publish live read command", read.getEntityId());

supervisor.tell(readResponse, getRef());
final RetrieveThingResponse retrieveThingResponse2 =
TestSetup.fishForMsgClass(this, RetrieveThingResponse.class);
final RetrieveThingResponse retrieveThingResponse2 = expectMsgClass(RetrieveThingResponse.class);
assertThat(retrieveThingResponse2.getDittoHeaders().getCorrelationId()).isEqualTo(
read.getDittoHeaders().getCorrelationId());
}};
Expand Down
2 changes: 1 addition & 1 deletion things/service/src/test/resources/logback-test.xml
Expand Up @@ -20,7 +20,7 @@

<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%-5level] %logger{15} - %msg%n%rEx</pattern>
<pattern>%date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20‚} - %msg%n%rEx</pattern>
</encoder>
</appender>

Expand Down

0 comments on commit 6bbc972

Please sign in to comment.