Skip to content

Commit

Permalink
fixed DittoClientLiveTest which assumed that "live-response" is issue…
Browse files Browse the repository at this point in the history
…d as requested-acknowledgement

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
  • Loading branch information
thjaeckle committed Sep 11, 2020
1 parent d3cc6ca commit 19dfffc
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,15 +365,9 @@ public void testFeatureMessageResponseAndAcknowledgement() {
.registerForMessage("Ackermann", "request", String.class, msg ->
msg.handleAcknowledgementRequests(handles -> {
try {
handles.forEach(handle -> {
if (LIVE_RESPONSE.equals(handle.getAcknowledgementLabel())) {
msg.reply().statusCode(HttpStatusCode.OK).payload("response").send();
} else {
handle.acknowledge(HttpStatusCode.forInt(
Integer.parseInt(handle.getAcknowledgementLabel().toString()))
.orElse(HttpStatusCode.EXPECTATION_FAILED));
}
});
handles.forEach(handle -> handle.acknowledge(HttpStatusCode.forInt(
Integer.parseInt(handle.getAcknowledgementLabel().toString()))
.orElse(HttpStatusCode.EXPECTATION_FAILED)));
messageReplyFuture.complete(null);
} catch (final Throwable error) {
messageReplyFuture.completeExceptionally(error);
Expand All @@ -394,7 +388,6 @@ public void testFeatureMessageResponseAndAcknowledgement() {
reply(featureMessage);
messageReplyFuture.join();

assertThat(expectMsgClass(SendFeatureMessageResponse.class).getStatusCode()).isEqualTo(HttpStatusCode.OK);
assertThat(expectMsgClass(Acknowledgement.class).getStatusCode()).isEqualTo(HttpStatusCode.CONTINUE);
assertThat(expectMsgClass(Acknowledgement.class).getStatusCode()).isEqualTo(HttpStatusCode.MOVED_PERMANENTLY);
assertThat(expectMsgClass(Acknowledgement.class).getStatusCode()).isEqualTo(HttpStatusCode.FORBIDDEN);
Expand Down

0 comments on commit 19dfffc

Please sign in to comment.