|
32 | 32 | * Tests for {@link OpenTelemetryEnvironmentVariableEnvironmentPostProcessor}. |
33 | 33 | * |
34 | 34 | * @author Moritz Halbritter |
| 35 | + * @author Abdullah Alqahtani |
35 | 36 | */ |
36 | 37 | @ExtendWith(OutputCaptureExtension.class) |
37 | 38 | class OpenTelemetryEnvironmentVariableEnvironmentPostProcessorTests { |
@@ -718,20 +719,16 @@ void fallbackEndpointWithTrailingSlashShouldAppendPathCorrectly() { |
718 | 719 | @Test |
719 | 720 | void timeoutZeroShouldBeInterpretedAsInfinite() { |
720 | 721 | Environment environment = runProcessor(Map.of("OTEL_EXPORTER_OTLP_TRACES_TIMEOUT", "0")); |
721 | | - assertThat(environment.getProperty("management.opentelemetry.tracing.export.otlp.timeout")) |
722 | | - .isEqualTo(Duration.ofSeconds(Long.MAX_VALUE).toString()); |
| 722 | + String max = Duration.ofNanos(Long.MAX_VALUE).toString(); |
| 723 | + assertThat(environment.getProperty("management.opentelemetry.tracing.export.otlp.timeout")).isEqualTo(max); |
723 | 724 | environment = runProcessor(Map.of("OTEL_EXPORTER_OTLP_LOGS_TIMEOUT", "0")); |
724 | | - assertThat(environment.getProperty("management.opentelemetry.logging.export.otlp.timeout")) |
725 | | - .isEqualTo(Duration.ofSeconds(Long.MAX_VALUE).toString()); |
| 725 | + assertThat(environment.getProperty("management.opentelemetry.logging.export.otlp.timeout")).isEqualTo(max); |
726 | 726 | environment = runProcessor(Map.of("OTEL_EXPORTER_OTLP_METRICS_TIMEOUT", "0")); |
727 | | - assertThat(environment.getProperty("management.otlp.metrics.export.read-timeout")) |
728 | | - .isEqualTo(Duration.ofSeconds(Long.MAX_VALUE).toString()); |
| 727 | + assertThat(environment.getProperty("management.otlp.metrics.export.read-timeout")).isEqualTo(max); |
729 | 728 | environment = runProcessor(Map.of("OTEL_BSP_EXPORT_TIMEOUT", "0")); |
730 | | - assertThat(environment.getProperty("management.opentelemetry.tracing.export.timeout")) |
731 | | - .isEqualTo(Duration.ofSeconds(Long.MAX_VALUE).toString()); |
| 729 | + assertThat(environment.getProperty("management.opentelemetry.tracing.export.timeout")).isEqualTo(max); |
732 | 730 | environment = runProcessor(Map.of("OTEL_BLRP_EXPORT_TIMEOUT", "0")); |
733 | | - assertThat(environment.getProperty("management.opentelemetry.logging.export.timeout")) |
734 | | - .isEqualTo(Duration.ofSeconds(Long.MAX_VALUE).toString()); |
| 731 | + assertThat(environment.getProperty("management.opentelemetry.logging.export.timeout")).isEqualTo(max); |
735 | 732 | } |
736 | 733 |
|
737 | 734 | @Test |
|
0 commit comments