Skip to content

Commit e5ed553

Browse files
authored
android-interop-testing: Improve errror logging (grpc#10972)
1 parent ac62c8b commit e5ed553

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

android-interop-testing/src/androidTest/java/io/grpc/android/integrationtest/InteropInstrumentationTest.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import java.util.concurrent.ExecutorService;
3131
import java.util.concurrent.Executors;
3232
import java.util.concurrent.TimeUnit;
33+
import java.util.concurrent.TimeoutException;
3334
import org.junit.Before;
3435
import org.junit.Test;
3536
import org.junit.runner.RunWith;
@@ -115,9 +116,10 @@ private void runTest(String testCase) throws Exception {
115116
result = executor.submit(new TestCallable(
116117
TesterOkHttpChannelBuilder.build(host, port, serverHostOverride, useTls, testCa),
117118
testCase)).get(TIMEOUT_SECONDS, TimeUnit.SECONDS);
118-
assertEquals(testCase + " failed", TestCallable.SUCCESS_MESSAGE, result);
119-
} catch (ExecutionException | InterruptedException e) {
119+
} catch (ExecutionException | InterruptedException | TimeoutException e) {
120+
Log.e(LOG_TAG, "Error while executing test case " + testCase, e);
120121
result = e.getMessage();
121122
}
123+
assertEquals(testCase + " failed", TestCallable.SUCCESS_MESSAGE, result);
122124
}
123125
}

0 commit comments

Comments
 (0)