From 50eeec61a65780ade4157bf077304fdd3403cb41 Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Mon, 19 Aug 2024 15:32:30 +0200 Subject: [PATCH] format --- .../pulsar/v2_8/AbstractPulsarClientTest.java | 54 +++++++++---------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/instrumentation/pulsar/pulsar-2.8/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/pulsar/v2_8/AbstractPulsarClientTest.java b/instrumentation/pulsar/pulsar-2.8/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/pulsar/v2_8/AbstractPulsarClientTest.java index 0c59835283e8..d136570e67d1 100644 --- a/instrumentation/pulsar/pulsar-2.8/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/pulsar/v2_8/AbstractPulsarClientTest.java +++ b/instrumentation/pulsar/pulsar-2.8/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/pulsar/v2_8/AbstractPulsarClientTest.java @@ -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.") @@ -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 @@ -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.") @@ -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.") @@ -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 sendAttributes(