asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mb...@apache.org
Subject asterixdb git commit: ASTERIXDB-1719 - Align HTTP Test Requests to $METHOD.http
Date Fri, 04 Nov 2016 22:13:48 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master d292151eb -> 314c0df16


ASTERIXDB-1719 - Align HTTP Test Requests to $METHOD.http

Change-Id: I60958f77226f1afb2585baf9248682c4867758d8
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1341
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>


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

Branch: refs/heads/master
Commit: 314c0df168fec698291a0fa8706d1e307505637e
Parents: d292151
Author: Michael Blow <mblow@apache.org>
Authored: Fri Nov 4 11:34:01 2016 -0400
Committer: Michael Blow <mblow@apache.org>
Committed: Fri Nov 4 15:13:25 2016 -0700

----------------------------------------------------------------------
 .../cluster_state_1.1.cstate.aql                |  24 -----
 .../cluster_state_1/cluster_state_1.1.get.http  |  25 +++++
 .../cluster_state_2.1.cstate.aql                |  25 -----
 .../cluster_state_2/cluster_state_2.1.get.http  |  25 +++++
 .../cluster_state_3.1.cstate.aql                |  25 -----
 .../cluster_state_3/cluster_state_3.1.get.http  |  25 +++++
 .../cluster_state_4.1.cstate.aql                |  25 -----
 .../cluster_state_4/cluster_state_4.1.get.http  |  25 +++++
 .../cluster_state_cc_1.1.cstate.aql             |  25 -----
 .../cluster_state_cc_1.1.get.http               |  25 +++++
 .../cluster_state_cc_stats_1.1.cstate.aql       |  25 -----
 .../cluster_state_cc_stats_1.1.get.http         |  25 +++++
 .../cluster_state_nc_threaddump_1.1.cstate.aql  |  25 -----
 .../cluster_state_nc_threaddump_1.1.get.http    |  25 +++++
 .../api/diagnostics_1/diagnostics_1.1.get.http  |  25 +++++
 .../diagnostics_1/diagnostics_1.1.httpapi.aql   |  25 -----
 .../api/replication/replication.1.get.http      |  25 +++++
 .../api/replication/replication.1.httpapi.aql   |  25 -----
 .../queries/api/version_1/version_1.1.get.http  |  25 +++++
 .../api/version_1/version_1.1.version.aql       |  24 -----
 .../apache/asterix/test/aql/TestExecutor.java   | 108 ++++++++++++-------
 .../testframework/context/TestFileContext.java  |   6 ++
 22 files changed, 325 insertions(+), 287 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.cstate.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.cstate.aql
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.cstate.aql
deleted file mode 100644
index 517b5b0..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.cstate.aql
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
- * Test case Name  : cluster_state_1
- * Description     : test cluster state api
- * Expected Result : Success
- * Date            : 7th September 2016
- */

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.get.http
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.get.http
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.get.http
new file mode 100644
index 0000000..08577ae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.get.http
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Test case Name  : cluster_state_1
+ * Description     : test cluster state api
+ * Expected Result : Success
+ * Date            : 7th September 2016
+ */
+/admin/cluster
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_2/cluster_state_2.1.cstate.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_2/cluster_state_2.1.cstate.aql
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_2/cluster_state_2.1.cstate.aql
deleted file mode 100644
index b88aed8..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_2/cluster_state_2.1.cstate.aql
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
- * Test case Name  : cluster_state_2
- * Description     : test cluster state api nonexistent node
- * Expected Result : Negative
- * Date            : 7th September 2016
- */
-/node/foo

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_2/cluster_state_2.1.get.http
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_2/cluster_state_2.1.get.http
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_2/cluster_state_2.1.get.http
new file mode 100644
index 0000000..a6414db
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_2/cluster_state_2.1.get.http
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Test case Name  : cluster_state_2
+ * Description     : test cluster state api nonexistent node
+ * Expected Result : Negative
+ * Date            : 7th September 2016
+ */
+/admin/cluster/node/foo

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_3/cluster_state_3.1.cstate.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_3/cluster_state_3.1.cstate.aql
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_3/cluster_state_3.1.cstate.aql
deleted file mode 100644
index 22b4a19..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_3/cluster_state_3.1.cstate.aql
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
- * Test case Name  : cluster_state_3
- * Description     : cluster state api all nodes
- * Expected Result : Positive
- * Date            : 8th September 2016
- */
-/node

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_3/cluster_state_3.1.get.http
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_3/cluster_state_3.1.get.http
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_3/cluster_state_3.1.get.http
new file mode 100644
index 0000000..8291cb7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_3/cluster_state_3.1.get.http
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Test case Name  : cluster_state_3
+ * Description     : cluster state api all nodes
+ * Expected Result : Positive
+ * Date            : 8th September 2016
+ */
+/admin/cluster/node

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_4/cluster_state_4.1.cstate.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_4/cluster_state_4.1.cstate.aql
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_4/cluster_state_4.1.cstate.aql
deleted file mode 100644
index 0faba10..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_4/cluster_state_4.1.cstate.aql
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
- * Test case Name  : cluster_state_4
- * Description     : cluster state api valid node
- * Expected Result : Positive
- * Date            : 8th September 2016
- */
-/node/asterix_nc1

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_4/cluster_state_4.1.get.http
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_4/cluster_state_4.1.get.http
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_4/cluster_state_4.1.get.http
new file mode 100644
index 0000000..401f9a5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_4/cluster_state_4.1.get.http
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Test case Name  : cluster_state_4
+ * Description     : cluster state api valid node
+ * Expected Result : Positive
+ * Date            : 8th September 2016
+ */
+/admin/cluster/node/asterix_nc1

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_cc_1/cluster_state_cc_1.1.cstate.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_cc_1/cluster_state_cc_1.1.cstate.aql
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_cc_1/cluster_state_cc_1.1.cstate.aql
deleted file mode 100644
index 726f7e7..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_cc_1/cluster_state_cc_1.1.cstate.aql
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
- * Test case Name  : cluster_state_3
- * Description     : cluster state api all nodes
- * Expected Result : Positive
- * Date            : 8th September 2016
- */
-/cc

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_cc_1/cluster_state_cc_1.1.get.http
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_cc_1/cluster_state_cc_1.1.get.http
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_cc_1/cluster_state_cc_1.1.get.http
new file mode 100644
index 0000000..5f248e8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_cc_1/cluster_state_cc_1.1.get.http
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Test case Name  : cluster_state_3
+ * Description     : cluster state api all nodes
+ * Expected Result : Positive
+ * Date            : 8th September 2016
+ */
+/admin/cluster/cc

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_cc_stats_1/cluster_state_cc_stats_1.1.cstate.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_cc_stats_1/cluster_state_cc_stats_1.1.cstate.aql
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_cc_stats_1/cluster_state_cc_stats_1.1.cstate.aql
deleted file mode 100644
index 1c6bab0..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_cc_stats_1/cluster_state_cc_stats_1.1.cstate.aql
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
- * Test case Name  : cluster_state_cc_stats_1
- * Description     : cluster cc stas
- * Expected Result : Positive
- * Date            : 8th September 2016
- */
-/cc/stats

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_cc_stats_1/cluster_state_cc_stats_1.1.get.http
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_cc_stats_1/cluster_state_cc_stats_1.1.get.http
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_cc_stats_1/cluster_state_cc_stats_1.1.get.http
new file mode 100644
index 0000000..edc6363
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_cc_stats_1/cluster_state_cc_stats_1.1.get.http
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Test case Name  : cluster_state_cc_stats_1
+ * Description     : cluster cc stas
+ * Expected Result : Positive
+ * Date            : 8th September 2016
+ */
+/admin/cluster/cc/stats

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_nc_threaddump_1/cluster_state_nc_threaddump_1.1.cstate.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_nc_threaddump_1/cluster_state_nc_threaddump_1.1.cstate.aql
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_nc_threaddump_1/cluster_state_nc_threaddump_1.1.cstate.aql
deleted file mode 100644
index b1aa5d3..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_nc_threaddump_1/cluster_state_nc_threaddump_1.1.cstate.aql
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
- * Test case Name  : cluster_state_nc_threaddump_1
- * Description     : NC threaddump
- * Expected Result : Positive
- * Date            : 8th September 2016
- */
-/node/asterix_nc2/threaddump

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_nc_threaddump_1/cluster_state_nc_threaddump_1.1.get.http
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_nc_threaddump_1/cluster_state_nc_threaddump_1.1.get.http
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_nc_threaddump_1/cluster_state_nc_threaddump_1.1.get.http
new file mode 100644
index 0000000..62cdfeb
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_nc_threaddump_1/cluster_state_nc_threaddump_1.1.get.http
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Test case Name  : cluster_state_nc_threaddump_1
+ * Description     : NC threaddump
+ * Expected Result : Positive
+ * Date            : 8th September 2016
+ */
+/admin/cluster/node/asterix_nc2/threaddump

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/diagnostics_1/diagnostics_1.1.get.http
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/diagnostics_1/diagnostics_1.1.get.http
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/diagnostics_1/diagnostics_1.1.get.http
new file mode 100644
index 0000000..c309110
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/diagnostics_1/diagnostics_1.1.get.http
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Test case Name  : diagnostics_1
+ * Description     : Diagnostics
+ * Expected Result : Positive
+ * Date            : 8th September 2016
+ */
+/admin/diagnostics

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/diagnostics_1/diagnostics_1.1.httpapi.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/diagnostics_1/diagnostics_1.1.httpapi.aql
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/diagnostics_1/diagnostics_1.1.httpapi.aql
deleted file mode 100644
index c309110..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/diagnostics_1/diagnostics_1.1.httpapi.aql
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
- * Test case Name  : diagnostics_1
- * Description     : Diagnostics
- * Expected Result : Positive
- * Date            : 8th September 2016
- */
-/admin/diagnostics

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/replication/replication.1.get.http
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/replication/replication.1.get.http
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/replication/replication.1.get.http
new file mode 100644
index 0000000..5976b5d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/replication/replication.1.get.http
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Test case Name  : replication
+ * Description     : Replication
+ * Expected Result : Positive
+ * Date            : 28th October 2016
+ */
+/admin/cluster/replication

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/replication/replication.1.httpapi.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/replication/replication.1.httpapi.aql
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/replication/replication.1.httpapi.aql
deleted file mode 100644
index 5976b5d..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/replication/replication.1.httpapi.aql
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
- * Test case Name  : replication
- * Description     : Replication
- * Expected Result : Positive
- * Date            : 28th October 2016
- */
-/admin/cluster/replication

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/version_1/version_1.1.get.http
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/version_1/version_1.1.get.http
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/version_1/version_1.1.get.http
new file mode 100644
index 0000000..0e6b893
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/version_1/version_1.1.get.http
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Test case Name  : version_1
+ * Description     : version api
+ * Expected Result : Success
+ * Date            : 8th September 2016
+ */
+/admin/version
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/version_1/version_1.1.version.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/version_1/version_1.1.version.aql
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/version_1/version_1.1.version.aql
deleted file mode 100644
index 6a75528..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/version_1/version_1.1.version.aql
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
- * Test case Name  : version_1
- * Description     : version api
- * Expected Result : Success
- * Date            : 8th September 2016
- */

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
b/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
index 0a1ad14..c6da1c0 100644
--- a/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
+++ b/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
@@ -371,6 +371,9 @@ public class TestExecutor {
 
     // For tests where you simply want the byte-for-byte output.
     private static void writeOutputToFile(File actualFile, InputStream resultStream) throws
Exception {
+        if (!actualFile.getParentFile().mkdirs()) {
+            LOGGER.warning("Unable to create actual file parent dir: " + actualFile.getParentFile());
+        }
         try (FileOutputStream out = new FileOutputStream(actualFile)) {
             IOUtils.copy(resultStream, out);
         }
@@ -454,11 +457,21 @@ public class TestExecutor {
         params.add(formatParam);
     }
 
+    private List<CompilationUnit.Parameter> injectStatement(String statement, String
stmtParamName,
+                                                            List<CompilationUnit.Parameter>
otherParams) {
+        CompilationUnit.Parameter stmtParam = new CompilationUnit.Parameter();
+        stmtParam.setName(stmtParamName);
+        stmtParam.setValue(statement);
+        List<CompilationUnit.Parameter> params = new ArrayList<>(otherParams);
+        params.add(stmtParam);
+        return params;
+    }
+
     private HttpUriRequest constructHttpMethod(String statement, String endpoint, String
stmtParam,
             boolean postStmtAsParam, List<CompilationUnit.Parameter> otherParams) {
         if (statement.length() + endpoint.length() < MAX_URL_LENGTH) {
             // Use GET for small-ish queries
-            return constructGetMethod(statement, endpoint, stmtParam, otherParams);
+            return constructGetMethod(endpoint, injectStatement(statement, stmtParam, otherParams));
         } else {
             // Use POST for bigger ones to avoid 413 FULL_HEAD
             String stmtParamName = (postStmtAsParam ? stmtParam : null);
@@ -466,21 +479,47 @@ public class TestExecutor {
         }
     }
 
-    private HttpUriRequest constructGetMethod(String statement, String endpoint, String stmtParam,
-            List<CompilationUnit.Parameter> otherParams) {
-        RequestBuilder builder = RequestBuilder.get(endpoint).addParameter(stmtParam, statement);
-        for (CompilationUnit.Parameter param : otherParams) {
+    private HttpUriRequest constructGetMethod(String endpoint, List<CompilationUnit.Parameter>
params) {
+        RequestBuilder builder = RequestBuilder.get(endpoint);
+        for (CompilationUnit.Parameter param : params) {
+            builder.addParameter(param.getName(), param.getValue());
+        }
+        builder.setCharset(StandardCharsets.UTF_8);
+        return builder.build();
+    }
+
+    private HttpUriRequest constructGetMethod(String endpoint, OutputFormat fmt,
+                                              List<CompilationUnit.Parameter> params)
{
+
+        HttpUriRequest method = constructGetMethod(endpoint, params);
+        // Set accepted output response type
+        method.setHeader("Accept", fmt.mimeType());
+        return method;
+    }
+
+    private HttpUriRequest constructPostMethod(String endpoint, List<CompilationUnit.Parameter>
params) {
+        RequestBuilder builder = RequestBuilder.post(endpoint);
+        for (CompilationUnit.Parameter param : params) {
             builder.addParameter(param.getName(), param.getValue());
         }
         builder.setCharset(StandardCharsets.UTF_8);
         return builder.build();
     }
 
+    private HttpUriRequest constructPostMethod(String endpoint, OutputFormat fmt,
+                                              List<CompilationUnit.Parameter> params)
{
+
+        HttpUriRequest method = constructPostMethod(endpoint, params);
+        // Set accepted output response type
+        method.setHeader("Accept", fmt.mimeType());
+        return method;
+    }
+
     protected HttpUriRequest constructPostMethodUrl(String statement, String endpoint, String
stmtParam,
             List<CompilationUnit.Parameter> otherParams) {
         RequestBuilder builder = RequestBuilder.post(endpoint);
         if (stmtParam != null) {
-            for (CompilationUnit.Parameter param : otherParams) {
+            for (CompilationUnit.Parameter param : injectStatement(statement, stmtParam,
otherParams)) {
                 builder.addParameter(param.getName(), param.getValue());
             }
             builder.addParameter(stmtParam, statement);
@@ -500,8 +539,7 @@ public class TestExecutor {
         RequestBuilder builder = RequestBuilder.post(endpoint);
         JSONObject content = new JSONObject();
         try {
-            content.put(stmtParam, statement);
-            for (CompilationUnit.Parameter param : otherParams) {
+            for (CompilationUnit.Parameter param : injectStatement(statement, stmtParam,
otherParams)) {
                 content.put(param.getName(), param.getValue());
             }
         } catch (JSONException e) {
@@ -513,8 +551,13 @@ public class TestExecutor {
     }
 
     public InputStream executeJSONGet(OutputFormat fmt, String url) throws Exception {
-        HttpUriRequest request = RequestBuilder.get(url).setHeader("Accept", fmt.mimeType()).build();
+        HttpUriRequest request = constructGetMethod(url, fmt, new ArrayList<>());
+        HttpResponse response = executeAndCheckHttpRequest(request);
+        return response.getEntity().getContent();
+    }
 
+    public InputStream executeJSONPost(OutputFormat fmt, String url) throws Exception {
+        HttpUriRequest request = constructPostMethod(url, fmt, new ArrayList<>());
         HttpResponse response = executeAndCheckHttpRequest(request);
         return response.getEntity().getContent();
     }
@@ -765,7 +808,6 @@ public class TestExecutor {
 
                 File actualResultFile = testCaseCtx.getActualResultFile(cUnit, expectedResultFile,
                         new File(actualPath));
-                actualResultFile.getParentFile().mkdirs();
                 writeOutputToFile(actualResultFile, resultStream);
 
                 runScriptAndCompareWithResult(testFile, new PrintWriter(System.err), expectedResultFile,
@@ -782,7 +824,6 @@ public class TestExecutor {
                 resultStream = executeQuery(statement, OutputFormat.forCompilationUnit(cUnit),
                         getEndpoint(Servlets.AQL_QUERY), cUnit.getParameter());
                 qbcFile = getTestCaseQueryBeforeCrashFile(actualPath, testCaseCtx, cUnit);
-                qbcFile.getParentFile().mkdirs();
                 writeOutputToFile(qbcFile, resultStream);
                 break;
             case "txnqar": // qar represents query after recovery
@@ -791,7 +832,6 @@ public class TestExecutor {
                 File qarFile = new File(actualPath + File.separator
                         + testCaseCtx.getTestCase().getFilePath().replace(File.separator,
"_") + "_" + cUnit.getName()
                         + "_qar.adm");
-                qarFile.getParentFile().mkdirs();
                 writeOutputToFile(qarFile, resultStream);
                 qbcFile = getTestCaseQueryBeforeCrashFile(actualPath, testCaseCtx, cUnit);
                 runScriptAndCompareWithResult(testFile, new PrintWriter(System.err), qbcFile,
qarFile);
@@ -859,36 +899,26 @@ public class TestExecutor {
                     throw new Exception(output);
                 }
                 break;
-            case "cstate": // cluster state query
-                fmt = OutputFormat.forCompilationUnit(cUnit);
-                String extra = stripJavaComments(statement).trim();
-                resultStream = executeJSONGet(fmt, getEndpoint(Servlets.CLUSTER_STATE) +
extra);
-                expectedResultFile = expectedResultFileCtxs.get(queryCount.intValue()).getFile();
-                actualResultFile = testCaseCtx.getActualResultFile(cUnit, expectedResultFile,
new File(actualPath));
-                actualResultFile.getParentFile().mkdirs();
-                writeOutputToFile(actualResultFile, resultStream);
-                runScriptAndCompareWithResult(testFile, new PrintWriter(System.err), expectedResultFile,
-                        actualResultFile);
-                queryCount.increment();
-                break;
-            case "version": // version servlet
-                fmt = OutputFormat.forCompilationUnit(cUnit);
-                resultStream = executeJSONGet(fmt, getEndpoint(Servlets.VERSION));
-                expectedResultFile = expectedResultFileCtxs.get(queryCount.intValue()).getFile();
-                actualResultFile = testCaseCtx.getActualResultFile(cUnit, expectedResultFile,
new File(actualPath));
-                actualResultFile.getParentFile().mkdirs();
-                writeOutputToFile(actualResultFile, resultStream);
-                runScriptAndCompareWithResult(testFile, new PrintWriter(System.err), expectedResultFile,
-                        actualResultFile);
-                queryCount.increment();
-                break;
-            case "httpapi": // http api
+            case "get":
+            case "post":
+                if (!"http".equals(ctx.extension())) {
+                    throw new IllegalArgumentException("Unexpected format for method " +
ctx.getType() + ": "
+                            + ctx.extension());
+                }
                 fmt = OutputFormat.forCompilationUnit(cUnit);
-                extra = stripJavaComments(statement).trim();
-                resultStream = executeJSONGet(fmt, "http://" + host + ":" + port + extra);
+                String endpoint = stripJavaComments(statement).trim();
+                switch (ctx.getType()) {
+                    case "get":
+                        resultStream = executeJSONGet(fmt, "http://" + host + ":" + port
+ endpoint);
+                        break;
+                    case "post":
+                        resultStream = executeJSONPost(fmt, "http://" + host + ":" + port
+ endpoint);
+                        break;
+                    default:
+                        throw new IllegalStateException("NYI: " + ctx.getType());
+                }
                 expectedResultFile = expectedResultFileCtxs.get(queryCount.intValue()).getFile();
                 actualResultFile = testCaseCtx.getActualResultFile(cUnit, expectedResultFile,
new File(actualPath));
-                actualResultFile.getParentFile().mkdirs();
                 writeOutputToFile(actualResultFile, resultStream);
                 runScriptAndCompareWithResult(testFile, new PrintWriter(System.err), expectedResultFile,
                         actualResultFile);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-test-framework/src/main/java/org/apache/asterix/testframework/context/TestFileContext.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-test-framework/src/main/java/org/apache/asterix/testframework/context/TestFileContext.java
b/asterixdb/asterix-test-framework/src/main/java/org/apache/asterix/testframework/context/TestFileContext.java
index 74a607d..e41a624 100644
--- a/asterixdb/asterix-test-framework/src/main/java/org/apache/asterix/testframework/context/TestFileContext.java
+++ b/asterixdb/asterix-test-framework/src/main/java/org/apache/asterix/testframework/context/TestFileContext.java
@@ -39,6 +39,12 @@ public class TestFileContext implements Comparable<TestFileContext>
{
         return type;
     }
 
+    public String extension() {
+        final String name = file.getName();
+        int lastDot = name.lastIndexOf('.');
+        return lastDot == -1 ? name : name.substring(lastDot + 1);
+    }
+
     public void setType(String type) {
         this.type = type;
     }


Mime
View raw message