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
This commit is contained in:
parent
eeebb3968b
commit
aa712114c6
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user