asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "abdullah alamoudi (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: [NOISSUE][TEST] Make store and validate requests non cancell...
Date Tue, 30 Jan 2018 21:30:45 GMT
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2341

Change subject: [NOISSUE][TEST] Make store and validate requests non cancellable
......................................................................

[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
---
M asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/41/2341/1

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 @@
     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 @@
             }
             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 @@
             return target;
         }
     }
+
+    private static boolean isCancellable(String type) {
+        return !NON_CANCELLABLE.contains(type);
+    }
 }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2341
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I722681d96f1b0de286dcf614ff15fc7aa625aadd
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi <bamousaa@gmail.com>

Mime
View raw message