Sampling too long Launcher tests

A test that takes > 3 min will generate an artifact file containing stacks of all threads of the test process taken every 3 sec. This artifact will be also generated if the test process is killed, for example, by timeout.

This artifact should help EngProd's effort to speed up presubmits.

Bug: 225186335
Test: local runs
Change-Id: I721779bfbe5bc6289315998ed2660f5f46165611
This commit is contained in:
vadimt
2022-04-19 17:31:28 -07:00
parent 1e0648475b
commit 25fbd5b0bb
4 changed files with 136 additions and 2 deletions

View File

@@ -68,6 +68,7 @@ import com.android.launcher3.util.Wait;
import com.android.launcher3.util.WidgetUtils;
import com.android.launcher3.util.rule.FailureWatcher;
import com.android.launcher3.util.rule.LauncherActivityRule;
import com.android.launcher3.util.rule.SamplerRule;
import com.android.launcher3.util.rule.ScreenRecordRule;
import com.android.launcher3.util.rule.ShellCommandRule;
import com.android.launcher3.util.rule.TestStabilityRule;
@@ -227,7 +228,8 @@ public abstract class AbstractLauncherUiTest {
@Rule
public TestRule mOrderSensitiveRules = RuleChain
.outerRule(new TestStabilityRule())
.outerRule(new SamplerRule())
.around(new TestStabilityRule())
.around(mActivityMonitor)
.around(getRulesInsideActivityMonitor());