File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
sdk/common/src/test/java/io/opentelemetry/sdk/internal Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1111import static org .mockito .Mockito .verify ;
1212import static org .mockito .Mockito .verifyNoInteractions ;
1313
14+ import java .util .concurrent .Callable ;
1415import java .util .concurrent .ExecutionException ;
1516import java .util .concurrent .ExecutorService ;
1617import java .util .concurrent .Executors ;
@@ -33,7 +34,7 @@ void verifyUncaughtExceptions()
3334 };
3435 ExecutorService service =
3536 Executors .newSingleThreadExecutor (new DaemonThreadFactory ("test" , delegateFactory ));
36- Runnable runnable =
37+ Callable < Boolean > callable =
3738 () -> {
3839 Thread .UncaughtExceptionHandler uncaughtExceptionHandler =
3940 Thread .currentThread ().getUncaughtExceptionHandler ();
@@ -53,8 +54,9 @@ void verifyUncaughtExceptions()
5354 IllegalStateException e = new IllegalStateException ();
5455 uncaughtExceptionHandler .uncaughtException (threadMock , e );
5556 verify (defaultHandler ).uncaughtException (threadMock , e );
57+ return true ;
5658 };
5759
58- service .submit (runnable ).get (5 , TimeUnit .SECONDS );
60+ assertThat ( service .submit (callable ).get (5 , TimeUnit .SECONDS )). isTrue ( );
5961 }
6062}
You can’t perform that action at this time.
0 commit comments