asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mb...@apache.org
Subject asterixdb git commit: [NO ISSUE][TEST] Minimize output on poll comparison failures
Date Tue, 12 Sep 2017 23:14:03 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 2e73820de -> 3166f43a1


[NO ISSUE][TEST] Minimize output on poll comparison failures

Change-Id: I020a4199520c2246f8c5a54d8916bb12206c2013
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2002
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <mhubail@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/3166f43a
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/3166f43a
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/3166f43a

Branch: refs/heads/master
Commit: 3166f43a1e787434cad41c872681d34cd7236be2
Parents: 2e73820
Author: Michael Blow <michael.blow@couchbase.com>
Authored: Tue Sep 12 14:51:51 2017 -0400
Committer: Michael Blow <mblow@apache.org>
Committed: Tue Sep 12 16:13:39 2017 -0700

----------------------------------------------------------------------
 .../apache/asterix/test/common/TestExecutor.java   | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3166f43a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
----------------------------------------------------------------------
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 06fbe63..b9b7bda 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
@@ -46,6 +46,7 @@ import java.util.List;
 import java.util.ListIterator;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
@@ -66,9 +67,9 @@ import org.apache.asterix.testframework.context.TestCaseContext;
 import org.apache.asterix.testframework.context.TestCaseContext.OutputFormat;
 import org.apache.asterix.testframework.context.TestFileContext;
 import org.apache.asterix.testframework.xml.ComparisonEnum;
+import org.apache.asterix.testframework.xml.TestGroup;
 import org.apache.asterix.testframework.xml.TestCase.CompilationUnit;
 import org.apache.asterix.testframework.xml.TestCase.CompilationUnit.Parameter;
-import org.apache.asterix.testframework.xml.TestGroup;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.output.ByteArrayOutputStream;
@@ -1262,8 +1263,18 @@ public class TestExecutor {
                     throw new Exception("Poll limit (" + timeoutSecs + "s) exceeded without
obtaining expected result");
 
                 }
-            } catch (Exception e) {
-                LOGGER.log(Level.INFO, "received exception on poll", e);
+            } catch (ExecutionException ee) {
+                Exception e;
+                if (ee.getCause() instanceof Exception) {
+                    e = (Exception) ee.getCause();
+                } else {
+                    e = ee;
+                }
+                if (e instanceof ComparisonException) {
+                    LOGGER.log(Level.INFO, "Comparison failure on poll: " + e.getMessage());
+                } else {
+                    LOGGER.log(Level.INFO, "received exception on poll", e);
+                }
                 responsesReceived++;
                 if (isExpected(e, cUnit)) {
                     expectedException = true;


Mime
View raw message