mirror of
https://github.com/samsonjs/media.git
synced 2026-04-01 10:35:48 +00:00
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
1 changed files with 6 additions and 0 deletions
|
|
@ -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…
Reference in a new issue