diff options
author | Stas Negara <snegara@google.com> | 2015-01-27 16:20:59 -0800 |
---|---|---|
committer | Stas Negara <snegara@google.com> | 2015-02-06 13:06:21 -0800 |
commit | 4186d2316587d7787c0a724dcb4ed3940212fe9d (patch) | |
tree | adada3f89c737b022d8bbd6eae71b990e4956876 | |
parent | a7a41c8f5217d258aedf24e21773526072db7953 (diff) | |
download | testing-4186d2316587d7787c0a724dcb4ed3940212fe9d.tar.gz |
Improved the wording for incompatible API levels message.
Change-Id: I702f8e1ca56d3e0028d7162a4656293cffd82625
-rw-r--r-- | src/com/google/gct/testing/CloudResultsLoader.java | 6 | ||||
-rw-r--r-- | src/com/google/gct/testing/launcher/CloudTestsLauncher.java | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/com/google/gct/testing/CloudResultsLoader.java b/src/com/google/gct/testing/CloudResultsLoader.java index e5e3242..ad135a8 100644 --- a/src/com/google/gct/testing/CloudResultsLoader.java +++ b/src/com/google/gct/testing/CloudResultsLoader.java @@ -175,7 +175,7 @@ public class CloudResultsLoader { for (Map.Entry<String, TestExecution> testExecutionEntry : testExecutions.entrySet()) { String encodedConfigurationInstance = testExecutionEntry.getKey(); String testExecutionId = testExecutionEntry.getValue().getId(); - if (testExecutionId.startsWith("Error ")) { // A backend error happened while triggering this test execution. + if (failedToTriggerTest(testExecutionId)) { // A backend error happened while triggering this test execution. String diffProgress = testExecutionId + "\n"; // The test execution's id carries the error message for the user. String previousProgress = getPreviousProgress(encodedConfigurationInstance); if (!previousProgress.endsWith(diffProgress)) { @@ -217,6 +217,10 @@ public class CloudResultsLoader { } } + private boolean failedToTriggerTest(String testExecutionId) { + return testExecutionId.startsWith("Error ") || testExecutionId.startsWith("Skipped "); + } + private void reportNewProgress(String encodedConfigurationInstance, String previousProgress, String newProgress) { newDataReceived = true; configurationProgress.put(encodedConfigurationInstance, newProgress); diff --git a/src/com/google/gct/testing/launcher/CloudTestsLauncher.java b/src/com/google/gct/testing/launcher/CloudTestsLauncher.java index c148cd3..f80162c 100644 --- a/src/com/google/gct/testing/launcher/CloudTestsLauncher.java +++ b/src/com/google/gct/testing/launcher/CloudTestsLauncher.java @@ -132,16 +132,15 @@ public class CloudTestsLauncher { testExecutions.put(matrixInstance, triggeredExecution); } catch (Exception e) { String errorMessage = e.getMessage(); - String userErrorMessage = ""; if (errorMessage.contains(INVALID_MATRIX_ELEMENT_ERROR_MESSAGE)) { - userErrorMessage = ": " + INVALID_MATRIX_ELEMENT_ERROR_MESSAGE; + currentTestExecution.setId("Skipped triggering the test execution: " + INVALID_MATRIX_ELEMENT_ERROR_MESSAGE); // An invalid configuration is a user error, no need to report. } else { GoogleCloudTestingUtils.showErrorMessage(null, "Error triggering a matrix test", "Failed to trigger a cloud test execution!\n" + "Exception while triggering a test execution\n\n" + errorMessage); + currentTestExecution.setId("Error triggering the test execution"); } - currentTestExecution.setId("Error triggering the test execution" + userErrorMessage); testExecutions.put(matrixInstance, currentTestExecution); } } |