Skip to content

Commit be228d6

Browse files
committed
test: adapt showcase tests
1 parent b6f0847 commit be228d6

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITOtelMetrics.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ void testHttpJson_operationSucceeded_recordsMetrics() throws InterruptedExceptio
349349
Map<String, String> expectedAttributes =
350350
ImmutableMap.of(
351351
MetricsTracer.METHOD_ATTRIBUTE,
352-
"google.showcase.v1beta1.Echo/Echo",
352+
"Echo.Echo",
353353
MetricsTracer.LANGUAGE_ATTRIBUTE,
354354
MetricsTracer.DEFAULT_LANGUAGE);
355355
verifyDefaultMetricsAttributes(actualMetricDataList, expectedAttributes);
@@ -406,7 +406,7 @@ void testHttpJson_operationCancelled_recordsMetrics() throws Exception {
406406
Map<String, String> expectedAttributes =
407407
ImmutableMap.of(
408408
MetricsTracer.METHOD_ATTRIBUTE,
409-
"google.showcase.v1beta1.Echo/Block",
409+
"Echo.Block",
410410
MetricsTracer.LANGUAGE_ATTRIBUTE,
411411
MetricsTracer.DEFAULT_LANGUAGE);
412412
verifyDefaultMetricsAttributes(actualMetricDataList, expectedAttributes);
@@ -464,7 +464,7 @@ void testHttpJson_operationFailed_recordsMetrics() throws InterruptedException {
464464
Map<String, String> expectedAttributes =
465465
ImmutableMap.of(
466466
MetricsTracer.METHOD_ATTRIBUTE,
467-
"google.showcase.v1beta1.Echo/Block",
467+
"Echo.Block",
468468
MetricsTracer.LANGUAGE_ATTRIBUTE,
469469
MetricsTracer.DEFAULT_LANGUAGE);
470470
verifyDefaultMetricsAttributes(actualMetricDataList, expectedAttributes);
@@ -588,7 +588,7 @@ void testHttpJson_attemptFailedRetriesExhausted_recordsMetrics() throws Exceptio
588588
Map<String, String> expectedAttributes =
589589
ImmutableMap.of(
590590
MetricsTracer.METHOD_ATTRIBUTE,
591-
"google.showcase.v1beta1.Echo/Echo",
591+
"Echo.Echo",
592592
MetricsTracer.LANGUAGE_ATTRIBUTE,
593593
MetricsTracer.DEFAULT_LANGUAGE);
594594
verifyDefaultMetricsAttributes(actualMetricDataList, expectedAttributes);
@@ -645,7 +645,7 @@ void testHttpJson_attemptPermanentFailure_recordsMetrics() throws InterruptedExc
645645
Map<String, String> expectedAttributes =
646646
ImmutableMap.of(
647647
MetricsTracer.METHOD_ATTRIBUTE,
648-
"google.showcase.v1beta1.Echo/Block",
648+
"Echo.Block",
649649
MetricsTracer.LANGUAGE_ATTRIBUTE,
650650
MetricsTracer.DEFAULT_LANGUAGE);
651651
verifyDefaultMetricsAttributes(actualMetricDataList, expectedAttributes);
@@ -777,7 +777,7 @@ void testHttpJson_multipleFailedAttempts_successfulOperation() throws Exception
777777
Map<String, String> expectedAttributes =
778778
ImmutableMap.of(
779779
MetricsTracer.METHOD_ATTRIBUTE,
780-
"google.showcase.v1beta1.Echo/Block",
780+
"Echo.Block",
781781
MetricsTracer.LANGUAGE_ATTRIBUTE,
782782
MetricsTracer.DEFAULT_LANGUAGE);
783783
verifyDefaultMetricsAttributes(actualMetricDataList, expectedAttributes);

java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITOtelTracing.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ void testTracing_successfulEcho_httpjson() throws Exception {
138138

139139
SpanData attemptSpan =
140140
spans.stream()
141-
.filter(span -> span.getName().equals("google.showcase.v1beta1/Echo/Echo/attempt"))
141+
.filter(span -> span.getName().equals("Echo/Echo/attempt"))
142142
.findFirst()
143143
.orElseThrow(() -> new AssertionError("Attempt span 'Echo/Echo/attempt' not found"));
144144
assertThat(attemptSpan.getKind()).isEqualTo(SpanKind.CLIENT);

0 commit comments

Comments
 (0)