Skip to content

Commit bfd65d8

Browse files
authored
test
1 parent f1b9833 commit bfd65d8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

gax-java/gax/src/test/java/com/google/api/gax/tracing/MetricsTracerTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,16 @@ void testAddAttributes_recordsAttributes() {
228228
assertThat(metricsTracer.getAttributes().get("FakeTableId")).isEqualTo("12345");
229229
}
230230

231+
@Test
232+
void testAddAttributes_recordsAttributes() {
233+
Map<String, String> attributes = new HashMap<>();
234+
attributes.put("FakeTableId", "12345");
235+
attributes.put("FakeInstanceId", "67890");
236+
metricsTracer.addAttributes(attributes);
237+
assertThat(metricsTracer.getAttributes().get("FakeTableId")).isEqualTo("12345");
238+
assertThat(metricsTracer.getAttributes().get("FakeInstanceId")).isEqualTo("67890");
239+
}
240+
231241
@Test
232242
void testExtractStatus_errorConversion_apiExceptions() {
233243
ApiException error =

0 commit comments

Comments
 (0)