Run leak detector in test isolation rule
This will help to fail the test causing the leak, not the next one
Bug: 187761685
Test: presubmit
Flag: N/A
Change-Id: I07e2457a9c8b9794d9c3ecc4764500dcdd3bbb10
diff --git a/tests/src/com/android/launcher3/util/rule/TestIsolationRule.java b/tests/src/com/android/launcher3/util/rule/TestIsolationRule.java
index 5cc4c5e..592cc9b 100644
--- a/tests/src/com/android/launcher3/util/rule/TestIsolationRule.java
+++ b/tests/src/com/android/launcher3/util/rule/TestIsolationRule.java
@@ -18,6 +18,7 @@
import androidx.annotation.NonNull;
import com.android.launcher3.tapl.LauncherInstrumentation;
+import com.android.launcher3.ui.AbstractLauncherUiTest;
import org.junit.rules.TestRule;
import org.junit.runner.Description;
@@ -42,6 +43,7 @@
base.evaluate();
// Make sure that Launcher workspace looks correct.
mLauncher.goHome();
+ AbstractLauncherUiTest.checkDetectedLeaks(mLauncher);
}
};
}