[NO ISSUE] Print expected and actual result for jsonregex
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
- Print both the expected and the actual result from the test
when a jsonregex comparison fails.
Change-Id: I46a1c734cc01672ed89224b42c6db148e9935b87
Reviewed-on: https://asterix-gerrit.ics.uci.edu/3483
Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
index 220ec38..344a3ba 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
@@ -260,8 +260,8 @@
throw new NullPointerException("Error parsing expected or actual result file for " + scriptFile);
}
if (!TestHelper.equalJson(expectedJson, actualJson)) {
- throw new ComparisonException(
- "Result for " + scriptFile + " didn't match the expected JSON" + "\n" + actualJson);
+ throw new ComparisonException("Result for " + scriptFile + " didn't match the expected JSON"
+ + "\nexpected result:\n" + expectedJson + "\nactual result:\n" + actualJson);
}
return;
}