Merge "Saving test artifacts in TAPL when the failure is diagnosed" into main

This commit is contained in:
Vadim Tryshev
2024-04-29 20:49:15 +00:00
committed by Android (Google) Code Review
5 changed files with 38 additions and 13 deletions

View File

@@ -205,11 +205,10 @@ public class NavigationModeSwitchRule implements TestRule {
boolean condition, Description description) {
launcher.checkForAnomaly(true, true);
if (!condition) {
final AssertionError assertionError = new AssertionError(message);
if (description != null) {
FailureWatcher.onError(launcher, description, assertionError);
FailureWatcher.onError(launcher, description);
}
throw assertionError;
throw new AssertionError(message);
}
}
}

View File

@@ -130,11 +130,10 @@ public class TaskbarModeSwitchRule implements TestRule {
boolean condition, Description description) {
launcher.checkForAnomaly(true, true);
if (!condition) {
final AssertionError assertionError = new AssertionError(message);
if (description != null) {
FailureWatcher.onError(launcher, description, assertionError);
FailureWatcher.onError(launcher, description);
}
throw assertionError;
throw new AssertionError(message);
}
}
}