From bfac8730fe1baa8acb4e95c1392ec3cb91a003e4 Mon Sep 17 00:00:00 2001 From: vadimt Date: Thu, 20 May 2021 15:48:29 -0700 Subject: [PATCH] Improving TAPL messaging Test: presubmit Bug: 187761685 Change-Id: I83eb0eef2f9c8c33cc9d1b42cb52fb670a5bf427 --- .../com/android/launcher3/tapl/LauncherInstrumentation.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index 57f40db205..4cf52f071d 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -496,13 +496,14 @@ public final class LauncherInstrumentation { private void fail(String message) { checkForAnomaly(); Assert.fail(formatSystemHealthMessage(formatErrorWithEvents( - "http://go/tapl test failure:\nOverview: " + getContextDescription() + "http://go/tapl test failure:\nSummary: " + getContextDescription() + " - visible state is " + getVisibleStateMessage() + ";\nDetails: " + message, true))); } private String getContextDescription() { - return mDiagnosticContext.isEmpty() ? "" : String.join(", ", mDiagnosticContext); + return mDiagnosticContext.isEmpty() + ? "(no context)" : String.join(", ", mDiagnosticContext); } void assertTrue(String message, boolean condition) {