-
Notifications
You must be signed in to change notification settings - Fork 17
test: Refactor telemetry tests to follow repository style guidelines #345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
7c7f370
5a62c89
3ec9992
8759175
b0a94d5
81b89f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,27 +26,7 @@ | |
| class LoggingTelemetryReporterTest { | ||
|
|
||
| @Test | ||
| public void testLoggingOptionsDefaultValues() { | ||
|
dheerajsngh marked this conversation as resolved.
|
||
| LoggingTelemetryOptions options = LoggingTelemetryOptions.builder().build(); | ||
|
|
||
| assertThat(options.isEnabled()).isFalse(); | ||
| assertThat(options.getLogLevel()).isEqualTo(LoggingTelemetryOptions.LogLevel.DEBUG); | ||
| } | ||
|
|
||
| @Test | ||
| public void testLoggingOptionsCustomValues() { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't this tests is present. We can add this back.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LoggingTelemetryOptions is an AutoValue class so generally we don't need to test the builder. Also testCreateFromOptions_WithAllOptions in |
||
| LoggingTelemetryOptions options = | ||
| LoggingTelemetryOptions.builder() | ||
| .setEnabled(true) | ||
| .setLogLevel(LoggingTelemetryOptions.LogLevel.INFO) | ||
| .build(); | ||
|
|
||
| assertThat(options.isEnabled()).isTrue(); | ||
| assertThat(options.getLogLevel()).isEqualTo(LoggingTelemetryOptions.LogLevel.INFO); | ||
| } | ||
|
|
||
| @Test | ||
| public void testFormatMetrics_singleMetricWithoutAttributes() { | ||
| void formatMetrics_singleMetricWithoutAttributes() { | ||
| try (LoggingTelemetryReporter reporter = | ||
| new LoggingTelemetryReporter(LoggingTelemetryOptions.builder().build())) { | ||
| Map<MetricKey, Long> metrics = | ||
|
|
@@ -63,7 +43,7 @@ public void testFormatMetrics_singleMetricWithoutAttributes() { | |
| } | ||
|
|
||
| @Test | ||
| public void testFormatMetrics_singleMetricWithAttributes() { | ||
| void formatMetrics_singleMetricWithAttributes() { | ||
| try (LoggingTelemetryReporter reporter = | ||
| new LoggingTelemetryReporter(LoggingTelemetryOptions.builder().build())) { | ||
| Map<MetricKey, Long> metrics = | ||
|
|
@@ -84,7 +64,7 @@ public void testFormatMetrics_singleMetricWithAttributes() { | |
| } | ||
|
|
||
| @Test | ||
| public void testFormatMetrics_multipleMetrics() { | ||
| void formatMetrics_multipleMetrics() { | ||
| try (LoggingTelemetryReporter reporter = | ||
| new LoggingTelemetryReporter(LoggingTelemetryOptions.builder().build())) { | ||
| Map<MetricKey, Long> metrics = | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.