Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitlinger committed Aug 19, 2024
1 parent e9ec7ee commit 50eeec6
Showing 1 changed file with 25 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ void testConsumeNonPartitionedTopicUsingBatchReceive() throws Exception {
Assertions.assertThat(testing.metrics())
.satisfiesExactlyInAnyOrder(
metric ->
OpenTelemetryAssertions.assertThat(metric)
assertThat(metric)
.hasName("messaging.receive.duration")
.hasUnit("s")
.hasDescription("Measures the duration of receive operation.")
Expand Down Expand Up @@ -208,23 +208,21 @@ void testConsumeNonPartitionedTopicUsingBatchReceive() throws Exception {
equalTo(SERVER_ADDRESS, brokerHost))
.hasBucketBoundaries(DURATION_BUCKETS))),
metric ->
OpenTelemetryAssertions.assertThat(metric)
assertThat(metric)
.hasName("messaging.receive.messages")
.hasUnit("{message}")
.hasDescription("Measures the number of received messages.")
.hasLongSumSatisfying(
sum -> {
sum.hasPointsSatisfying(
point -> {
point
.hasValue(1)
.hasAttributesSatisfying(
equalTo(MESSAGING_SYSTEM, "pulsar"),
equalTo(MESSAGING_DESTINATION_NAME, topic),
equalTo(SERVER_PORT, brokerPort),
equalTo(SERVER_ADDRESS, brokerHost));
});
}));
sum ->
sum.hasPointsSatisfying(
point ->
point
.hasValue(1)
.hasAttributesSatisfying(
equalTo(MESSAGING_SYSTEM, "pulsar"),
equalTo(MESSAGING_DESTINATION_NAME, topic),
equalTo(SERVER_PORT, brokerPort),
equalTo(SERVER_ADDRESS, brokerHost)))));
}

@Test
Expand Down Expand Up @@ -292,7 +290,7 @@ void testConsumeNonPartitionedTopicUsingBatchReceiveAsync() throws Exception {
assertThat(testing.metrics())
.satisfiesExactlyInAnyOrder(
metric ->
OpenTelemetryAssertions.assertThat(metric)
assertThat(metric)
.hasName("messaging.receive.duration")
.hasUnit("s")
.hasDescription("Measures the duration of receive operation.")
Expand All @@ -309,7 +307,7 @@ void testConsumeNonPartitionedTopicUsingBatchReceiveAsync() throws Exception {
equalTo(SERVER_ADDRESS, brokerHost))
.hasBucketBoundaries(DURATION_BUCKETS))),
metric ->
OpenTelemetryAssertions.assertThat(metric)
assertThat(metric)
.hasName("messaging.publish.duration")
.hasUnit("s")
.hasDescription("Measures the duration of publish operation.")
Expand All @@ -326,23 +324,21 @@ void testConsumeNonPartitionedTopicUsingBatchReceiveAsync() throws Exception {
equalTo(SERVER_ADDRESS, brokerHost))
.hasBucketBoundaries(DURATION_BUCKETS))),
metric ->
OpenTelemetryAssertions.assertThat(metric)
assertThat(metric)
.hasName("messaging.receive.messages")
.hasUnit("{message}")
.hasDescription("Measures the number of received messages.")
.hasLongSumSatisfying(
sum -> {
sum.hasPointsSatisfying(
point -> {
point
.hasValue(1)
.hasAttributesSatisfying(
equalTo(MESSAGING_SYSTEM, "pulsar"),
equalTo(MESSAGING_DESTINATION_NAME, topic),
equalTo(SERVER_PORT, brokerPort),
equalTo(SERVER_ADDRESS, brokerHost));
});
}));
sum ->
sum.hasPointsSatisfying(
point ->
point
.hasValue(1)
.hasAttributesSatisfying(
equalTo(MESSAGING_SYSTEM, "pulsar"),
equalTo(MESSAGING_DESTINATION_NAME, topic),
equalTo(SERVER_PORT, brokerPort),
equalTo(SERVER_ADDRESS, brokerHost)))));
}

static List<AttributeAssertion> sendAttributes(
Expand Down

0 comments on commit 50eeec6

Please sign in to comment.