asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amo...@apache.org
Subject asterixdb git commit: [NOISSUE][TEST] Make store and validate requests non cancellable
Date Tue, 30 Jan 2018 23:49:02 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master a252d78a6 -> 248e18aad


[NOISSUE][TEST] Make store and validate requests non cancellable

- user model changes: no
- storage format changes: no
- interface changes: no

details:
- Make store and validate requests non cancellable.

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


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

Branch: refs/heads/master
Commit: 248e18aad2e2482b97a19b0c62eccfd6d4799d0e
Parents: a252d78
Author: Abdullah Alamoudi <bamousaa@gmail.com>
Authored: Tue Jan 30 13:29:40 2018 -0800
Committer: abdullah alamoudi <bamousaa@gmail.com>
Committed: Tue Jan 30 15:48:48 2018 -0800

----------------------------------------------------------------------
 .../java/org/apache/asterix/test/common/TestExecutor.java    | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/248e18aa/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 9cce657..eeea05a 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
@@ -126,6 +126,8 @@ public class TestExecutor {
     private static final Pattern MAX_RESULT_READS_PATTERN =
             Pattern.compile("maxresultreads=(\\d+)(\\D|$)", Pattern.MULTILINE);
     public static final int TRUNCATE_THRESHOLD = 16384;
+    public static final Set<String> NON_CANCELLABLE =
+            Collections.unmodifiableSet(new HashSet<>(Arrays.asList("store", "validate")));
 
     public static final String DELIVERY_ASYNC = "async";
     public static final String DELIVERY_DEFERRED = "deferred";
@@ -1221,7 +1223,7 @@ public class TestExecutor {
             }
             final URI uri = getEndpoint(Servlets.QUERY_SERVICE);
             if (DELIVERY_IMMEDIATE.equals(delivery)) {
-                resultStream = executeQueryService(statement, fmt, uri, params, true, null,
true);
+                resultStream = executeQueryService(statement, fmt, uri, params, true, null,
isCancellable(reqType));
                 resultStream = METRICS_QUERY_TYPE.equals(reqType) ? ResultExtractor.extractMetrics(resultStream)
                         : ResultExtractor.extract(resultStream);
             } else {
@@ -1832,4 +1834,8 @@ public class TestExecutor {
             return target;
         }
     }
+
+    private static boolean isCancellable(String type) {
+        return !NON_CANCELLABLE.contains(type);
+    }
 }


Mime
View raw message