diff options
author | Terry Wilson <tmwilson@google.com> | 2024-03-04 11:23:17 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-04 11:23:17 -0800 |
commit | e5ed55399d198b6e95ea57664dacf8d14c43877e (patch) | |
tree | f4b5342ec3da02755b3667c81a16ddf318bb5fba | |
parent | ac62c8b055cc415f7d8b17edad6abcb3ade548cf (diff) | |
download | grpc-grpc-java-e5ed55399d198b6e95ea57664dacf8d14c43877e.tar.gz |
android-interop-testing: Improve errror logging (#10972)
-rw-r--r-- | android-interop-testing/src/androidTest/java/io/grpc/android/integrationtest/InteropInstrumentationTest.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/android-interop-testing/src/androidTest/java/io/grpc/android/integrationtest/InteropInstrumentationTest.java b/android-interop-testing/src/androidTest/java/io/grpc/android/integrationtest/InteropInstrumentationTest.java index 5b06c91fe..a5870063a 100644 --- a/android-interop-testing/src/androidTest/java/io/grpc/android/integrationtest/InteropInstrumentationTest.java +++ b/android-interop-testing/src/androidTest/java/io/grpc/android/integrationtest/InteropInstrumentationTest.java @@ -30,6 +30,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -115,9 +116,10 @@ public class InteropInstrumentationTest { result = executor.submit(new TestCallable( TesterOkHttpChannelBuilder.build(host, port, serverHostOverride, useTls, testCa), testCase)).get(TIMEOUT_SECONDS, TimeUnit.SECONDS); - assertEquals(testCase + " failed", TestCallable.SUCCESS_MESSAGE, result); - } catch (ExecutionException | InterruptedException e) { + } catch (ExecutionException | InterruptedException | TimeoutException e) { + Log.e(LOG_TAG, "Error while executing test case " + testCase, e); result = e.getMessage(); } + assertEquals(testCase + " failed", TestCallable.SUCCESS_MESSAGE, result); } } |