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>
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 @@
         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 @@
                 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 @@
                 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 @@
         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 @@
                     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) {