mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
Improving TAPL error messages
Test: forrest Bug: 187761685 Change-Id: I822f3f28e7153028fb5746e037066153478ec86d
This commit is contained in:
@@ -445,11 +445,10 @@ public final class LauncherInstrumentation {
|
||||
|
||||
if (systemHealth != null) {
|
||||
return message
|
||||
+ ",\nperhaps linked to system health problems:\n<<<<<<<<<<<<<<<<<<\n"
|
||||
+ ";\nPerhaps linked to system health problems:\n<<<<<<<<<<<<<<<<<<\n"
|
||||
+ systemHealth + "\n>>>>>>>>>>>>>>>>>>";
|
||||
}
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
@@ -460,7 +459,7 @@ public final class LauncherInstrumentation {
|
||||
if (checkEvents) {
|
||||
final String eventMismatch = eventChecker.verify(0, false);
|
||||
if (eventMismatch != null) {
|
||||
message = message + ", having produced " + eventMismatch;
|
||||
message = message + ";\n" + eventMismatch;
|
||||
}
|
||||
} else {
|
||||
eventChecker.finishNoWait();
|
||||
@@ -497,12 +496,13 @@ public final class LauncherInstrumentation {
|
||||
private void fail(String message) {
|
||||
checkForAnomaly();
|
||||
Assert.fail(formatSystemHealthMessage(formatErrorWithEvents(
|
||||
"http://go/tapl : " + getContextDescription() + message
|
||||
+ " (visible state: " + getVisibleStateMessage() + ")", true)));
|
||||
"http://go/tapl test failure:\nOverview: " + getContextDescription()
|
||||
+ " - visible state is " + getVisibleStateMessage()
|
||||
+ ";\nDetails: " + message, true)));
|
||||
}
|
||||
|
||||
private String getContextDescription() {
|
||||
return mDiagnosticContext.isEmpty() ? "" : String.join(", ", mDiagnosticContext) + "; ";
|
||||
return mDiagnosticContext.isEmpty() ? "" : String.join(", ", mDiagnosticContext);
|
||||
}
|
||||
|
||||
void assertTrue(String message, boolean condition) {
|
||||
|
||||
@@ -115,7 +115,7 @@ public class LogEventChecker {
|
||||
}
|
||||
}
|
||||
|
||||
return hasMismatches ? "mismatching events: " + sb.toString() : null;
|
||||
return hasMismatches ? "Mismatching events: " + sb.toString() : null;
|
||||
}
|
||||
|
||||
// If the list of actual events matches the list of expected events, returns -1, otherwise
|
||||
|
||||
Reference in New Issue
Block a user