asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjaco...@apache.org
Subject asterixdb git commit: Allow update statements in the tests to return adm
Date Wed, 19 Apr 2017 22:39:47 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master e383d5f72 -> 39dd9059e


Allow update statements in the tests to return adm

Allows subscribe statements to be tested in BAD

Change-Id: Ia39123a1e5c1ca5dde368f77f40be00b9c0d130d
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1693
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
BAD: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Ian Maxon <imaxon@apache.org>


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

Branch: refs/heads/master
Commit: 39dd9059eb504bee8ff7a9f8726c833838ad18c4
Parents: e383d5f
Author: Steven Glenn Jacobs <sjaco002@ucr.edu>
Authored: Wed Apr 19 14:06:32 2017 -0700
Committer: Steven Jacobs <sjaco002@ucr.edu>
Committed: Wed Apr 19 15:39:24 2017 -0700

----------------------------------------------------------------------
 .../apache/asterix/test/common/TestExecutor.java  | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/39dd9059/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 d585c39..8457681 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
@@ -451,8 +451,8 @@ public class TestExecutor {
         return response.getEntity().getContent();
     }
 
-    public InputStream executeQueryService(String str, URI uri) throws Exception {
-        return executeQueryService(str, OutputFormat.CLEAN_JSON, uri, new ArrayList<>(),
false);
+    public InputStream executeQueryService(String str, URI uri, OutputFormat fmt) throws
Exception {
+        return executeQueryService(str, fmt, uri, new ArrayList<>(), false);
     }
 
     public InputStream executeQueryService(String str, OutputFormat fmt, URI uri,
@@ -755,8 +755,8 @@ public class TestExecutor {
                 if (ctx.getFile().getName().endsWith("aql")) {
                     executeDDL(statement, getEndpoint(Servlets.AQL_DDL));
                 } else {
-                    InputStream resultStream =
-                            executeQueryService(statement, getEndpoint(Servlets.QUERY_SERVICE));
+                    InputStream resultStream = executeQueryService(statement, getEndpoint(Servlets.QUERY_SERVICE),
+                            OutputFormat.CLEAN_JSON);
                     ResultExtractor.extract(resultStream);
                 }
                 break;
@@ -768,8 +768,8 @@ public class TestExecutor {
                 if (ctx.getFile().getName().endsWith("aql")) {
                     executeUpdate(statement, getEndpoint(Servlets.AQL_UPDATE));
                 } else {
-                    InputStream resultStream =
-                            executeQueryService(statement, getEndpoint(Servlets.QUERY_SERVICE));
+                    InputStream resultStream = executeQueryService(statement, getEndpoint(Servlets.QUERY_SERVICE),
+                            OutputFormat.forCompilationUnit(cUnit));
                     ResultExtractor.extract(resultStream);
                 }
                 break;
@@ -1254,7 +1254,7 @@ public class TestExecutor {
         try {
             ArrayList<String> toBeDropped = new ArrayList<>();
             InputStream resultStream = executeQueryService("select dv.DataverseName from
Metadata.`Dataverse` as dv;",
-                    getEndpoint(Servlets.QUERY_SERVICE));
+                    getEndpoint(Servlets.QUERY_SERVICE), OutputFormat.CLEAN_JSON);
             String out = IOUtils.toString(resultStream);
             ObjectMapper om = new ObjectMapper();
             om.setConfig(
@@ -1284,8 +1284,8 @@ public class TestExecutor {
                     dropStatement.append(dv);
                     dropStatement.append(";\n");
                 }
-                resultStream =
-                        executeQueryService(dropStatement.toString(), getEndpoint(Servlets.QUERY_SERVICE));
+                resultStream = executeQueryService(dropStatement.toString(), getEndpoint(Servlets.QUERY_SERVICE),
+                        OutputFormat.CLEAN_JSON);
                 ResultExtractor.extract(resultStream);
             }
         } catch (Throwable th) {


Mime
View raw message