File tree Expand file tree Collapse file tree 2 files changed +2
-14
lines changed
main/java/com/google/cloud/spanner
test/java/com/google/cloud/spanner Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -282,8 +282,6 @@ public TransactionRunner readWriteTransaction(TransactionOption... options) {
282282 span .setStatus (e );
283283 span .end ();
284284 throw e ;
285- } finally {
286- span .end ();
287285 }
288286 }
289287
@@ -310,8 +308,6 @@ public AsyncRunner runAsync(TransactionOption... options) {
310308 span .setStatus (e );
311309 span .end ();
312310 throw e ;
313- } finally {
314- span .end ();
315311 }
316312 }
317313
@@ -324,8 +320,6 @@ public AsyncTransactionManager transactionManagerAsync(TransactionOption... opti
324320 span .setStatus (e );
325321 span .end ();
326322 throw e ;
327- } finally {
328- span .end ();
329323 }
330324 }
331325
Original file line number Diff line number Diff line change @@ -4022,10 +4022,7 @@ public void testRunAsync_usesOptions() {
40224022 when (pool .getSession ()).thenReturn (session );
40234023 TransactionOption option = mock (TransactionOption .class );
40244024
4025- TraceWrapper traceWrapper =
4026- new TraceWrapper (Tracing .getTracer (), OpenTelemetry .noop ().getTracer ("" ), false );
4027-
4028- DatabaseClientImpl client = new DatabaseClientImpl (pool , traceWrapper );
4025+ DatabaseClientImpl client = new DatabaseClientImpl (pool , mock (TraceWrapper .class ));
40294026 client .runAsync (option );
40304027
40314028 verify (session ).runAsync (option );
@@ -4038,10 +4035,7 @@ public void testTransactionManagerAsync_usesOptions() {
40384035 when (pool .getSession ()).thenReturn (session );
40394036 TransactionOption option = mock (TransactionOption .class );
40404037
4041- TraceWrapper traceWrapper =
4042- new TraceWrapper (Tracing .getTracer (), OpenTelemetry .noop ().getTracer ("" ), false );
4043-
4044- DatabaseClientImpl client = new DatabaseClientImpl (pool , traceWrapper );
4038+ DatabaseClientImpl client = new DatabaseClientImpl (pool , mock (TraceWrapper .class ));
40454039 try (AsyncTransactionManager ignore = client .transactionManagerAsync (option )) {
40464040 verify (session ).transactionManagerAsync (option );
40474041 }
You can’t perform that action at this time.
0 commit comments