Skip to content

Commit

Permalink
android-interop-testing: Improve errror logging (#10972)
Browse files Browse the repository at this point in the history
  • Loading branch information
temawi committed Mar 4, 2024
1 parent ac62c8b commit e5ed553
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
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;
Expand Down Expand Up @@ -115,9 +116,10 @@ private void runTest(String testCase) throws Exception {
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);
}
}

0 comments on commit e5ed553

Please sign in to comment.