Skip to content

Commit

Permalink
AWS SDK 2 upgrade: Fix bug with wrong message header conversion - spr…
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristine Jetzke committed Feb 17, 2020
1 parent caee338 commit 430ae5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private static Map<String, Object> getAttributesAsMessageHeaders(
Map<String, Object> messageHeaders = new HashMap<>();
for (Map.Entry<MessageSystemAttributeName, String> attributeKeyValuePair : message
.attributes().entrySet()) {
messageHeaders.put(attributeKeyValuePair.getKey().name(),
messageHeaders.put(attributeKeyValuePair.getKey().toString(),
attributeKeyValuePair.getValue());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,7 @@ protected void executeMessage(
container.stop();

verify(messageHandler).handleMessage(this.stringMessageCaptor.capture());
//TODO SDK2 migration: why is this now uppercase? used to be SenderId
assertThat(this.stringMessageCaptor.getValue().getHeaders().get("SENDER_ID"))
assertThat(this.stringMessageCaptor.getValue().getHeaders().get("SenderId"))
.isEqualTo("ID");

}
Expand Down

0 comments on commit 430ae5c

Please sign in to comment.