Skip to content

Commit dcc229d

Browse files
authored
Revert "fix(spanner): end spans for read-write methods (#3629)"
This reverts commit 4a1f99c.
1 parent a5ebcd3 commit dcc229d

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClientImpl.java

-2
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,6 @@ public TransactionManager transactionManager(TransactionOption... options) {
294294
span.setStatus(e);
295295
span.end();
296296
throw e;
297-
} finally {
298-
span.end();
299297
}
300298
}
301299

google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -4006,10 +4006,7 @@ public void testTransactionManager_usesOptions() {
40064006
when(pool.getSession()).thenReturn(session);
40074007
TransactionOption option = mock(TransactionOption.class);
40084008

4009-
TraceWrapper traceWrapper =
4010-
new TraceWrapper(Tracing.getTracer(), OpenTelemetry.noop().getTracer(""), false);
4011-
4012-
DatabaseClientImpl client = new DatabaseClientImpl(pool, traceWrapper);
4009+
DatabaseClientImpl client = new DatabaseClientImpl(pool, mock(TraceWrapper.class));
40134010
try (TransactionManager ignore = client.transactionManager(option)) {
40144011
verify(session).transactionManager(option);
40154012
}

0 commit comments

Comments
 (0)