Commit aa712114 by tonihei Committed by Oliver Woodman

Force stop hosted test after timeout.

When hosted tests run into a timeout, the outer test method stops.
However, the hosted test itself may continue running and needs to be
forced-stopped to ensure it does not block any resources needed by
subsequent test methods.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166208204
parent eeebb396
......@@ -137,6 +137,12 @@ public final class HostActivity extends Activity implements SurfaceHolder.Callba
fail(message);
}
} else {
runOnUiThread(new Runnable() {
@Override
public void run() {
hostedTest.forceStop();
}
});
String message = "Test timed out after " + timeoutMs + " ms.";
Log.e(TAG, message);
if (failOnTimeout) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment