Skip to content

Commit

Permalink
use array
Browse files Browse the repository at this point in the history
  • Loading branch information
crossoverJie committed Jun 18, 2024
1 parent 53b2dee commit df187f4
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import static io.opentelemetry.semconv.incubating.MessagingIncubatingAttributes.MESSAGING_MESSAGE_ID;
import static io.opentelemetry.semconv.incubating.MessagingIncubatingAttributes.MESSAGING_OPERATION;
import static io.opentelemetry.semconv.incubating.MessagingIncubatingAttributes.MESSAGING_SYSTEM;
import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
import static org.assertj.core.api.Assertions.assertThat;

import io.opentelemetry.api.common.AttributeKey;
Expand Down Expand Up @@ -79,12 +77,9 @@ abstract class AbstractPulsarClientTest {

private static final AttributeKey<String> MESSAGE_TYPE =
AttributeKey.stringKey("messaging.pulsar.message.type");

private static final List<Double> DURATION_SECONDS_BUCKETS =
unmodifiableList(
asList(0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1.0, 2.5, 5.0, 7.5, 10.0));
private static final double[] DURATION_BUCKETS =
DURATION_SECONDS_BUCKETS.stream().mapToDouble(d -> d).toArray();
private static final double[] DURATION_BUCKETS = new double[] {
0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1.0, 2.5, 5.0, 7.5, 10.0
};

@BeforeAll
static void beforeAll() throws PulsarClientException {
Expand Down

0 comments on commit df187f4

Please sign in to comment.