Skip to content

Commit ea70d5f

Browse files
Formatting
1 parent 2e07b3d commit ea70d5f

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

spring-cloud-aws-modulith/spring-cloud-aws-modulith-events-sns/src/test/java/io/awspring/cloud/modulith/events/sns/SnsEventPublicationIntegrationTests.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,21 +102,20 @@ void publishesEventToSns() {
102102
.getQueueAttributes(r -> r.queueUrl(queueUrl).attributeNames(QueueAttributeName.QUEUE_ARN)).join()
103103
.attributes().get(QueueAttributeName.QUEUE_ARN);
104104

105-
snsClient.subscribe(r -> r.attributes(Map.of("RawMessageDelivery", "true")).topicArn(topicArn).protocol("sqs").endpoint(queueArn));
105+
snsClient.subscribe(r -> r.attributes(Map.of("RawMessageDelivery", "true")).topicArn(topicArn).protocol("sqs")
106+
.endpoint(queueArn));
106107

107108
publisher.publishEvent();
108109

109110
await().untilAsserted(() -> {
110-
var response = sqsAsyncClient.receiveMessage(r -> r.queueUrl(queueUrl).messageAttributeNames("testKey")).join();
111+
var response = sqsAsyncClient.receiveMessage(r -> r.queueUrl(queueUrl).messageAttributeNames("testKey"))
112+
.join();
111113

112114
assertThat(response.hasMessages()).isTrue();
113115

114116
// Assert header added
115-
assertThat(response.messages())
116-
.extracting(Message::messageAttributes)
117-
.extracting(it -> it.get("testKey"))
118-
.extracting(MessageAttributeValue::stringValue)
119-
.containsExactly("testValue");
117+
assertThat(response.messages()).extracting(Message::messageAttributes).extracting(it -> it.get("testKey"))
118+
.extracting(MessageAttributeValue::stringValue).containsExactly("testValue");
120119
});
121120
}
122121

spring-cloud-aws-modulith/spring-cloud-aws-modulith-events-sqs/src/test/java/io/awspring/cloud/modulith/events/sqs/SqsEventPublicationIntegrationTests.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,14 @@ void publishesEventToSqs() throws Exception {
9797
publisher.publishEvent();
9898

9999
await().untilAsserted(() -> {
100-
var response = sqsAsyncClient.receiveMessage(r -> r.queueUrl(queueUrl).messageAttributeNames("testKey")).join();
100+
var response = sqsAsyncClient.receiveMessage(r -> r.queueUrl(queueUrl).messageAttributeNames("testKey"))
101+
.join();
101102

102103
assertThat(response.hasMessages()).isTrue();
103104

104105
// Assert header added
105-
assertThat(response.messages())
106-
.extracting(Message::messageAttributes)
107-
.extracting(it -> it.get("testKey"))
108-
.extracting(MessageAttributeValue::stringValue)
109-
.containsExactly("testValue");
106+
assertThat(response.messages()).extracting(Message::messageAttributes).extracting(it -> it.get("testKey"))
107+
.extracting(MessageAttributeValue::stringValue).containsExactly("testValue");
110108
});
111109
}
112110

0 commit comments

Comments
 (0)