asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buyin...@apache.org
Subject asterixdb git commit: ASTERIXDB-867: add a regression test.
Date Tue, 09 Aug 2016 01:07:06 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 58dfdc99a -> 112b39eea


ASTERIXDB-867: add a regression test.

Change-Id: I84f2df6c9c6da127990c5e2e2bec67d73d33fe88
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1055
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/112b39ee
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/112b39ee
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/112b39ee

Branch: refs/heads/master
Commit: 112b39eea5914a422c60b900f2d6c2b741eb19f7
Parents: 58dfdc9
Author: Yingyi Bu <yingyi@couchbase.com>
Authored: Mon Aug 8 12:12:51 2016 -0700
Committer: Yingyi Bu <buyingyi@gmail.com>
Committed: Mon Aug 8 18:06:42 2016 -0700

----------------------------------------------------------------------
 .../query-ASTERIXDB-867.1.ddl.aql               | 47 ++++++++++++++++++++
 .../query-ASTERIXDB-867.2.update.aql            | 34 ++++++++++++++
 .../query-ASTERIXDB-867.3.query.aql             | 27 +++++++++++
 .../query-ASTERIXDB-867.1.adm                   |  2 +
 .../src/test/resources/runtimets/testsuite.xml  |  5 +++
 5 files changed, 115 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/112b39ee/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.1.ddl.aql
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.1.ddl.aql
new file mode 100644
index 0000000..5b892ec
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.1.ddl.aql
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type page_info_type as {
+}
+
+create type page_views_type as closed {
+  user: string,
+  action: int32,
+  timespent: int32,
+  query_term: string,
+  ip_addr: int32,
+  timestamp: int32,
+  estimated_revenue: double,
+  page_info: page_info_type,
+  page_links: {{ page_info_type}}
+}
+
+create dataset page_views(page_views_type) primary key user;
+
+create type incr_id_type as closed {
+  id: uuid,
+  user: string,
+  header: string?
+}
+
+create dataset by_actions(incr_id_type) primary key id autogenerated;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/112b39ee/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.2.update.aql
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.2.update.aql
new file mode 100644
index 0000000..577d504
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.2.update.aql
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+use dataverse test;
+
+load dataset page_views using localfs
+(("path"="asterix_nc1://data/page_views.adm"),("format"="adm"));
+
+insert into dataset by_actions (
+  for $t in dataset page_views
+  where ($t.action = 1)
+  return
+  { "user": $t.user, "header": $t.page_info.a }
+);
+
+insert into dataset by_actions (
+  {"user": "kereno", "header": "zzz"}
+);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/112b39ee/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.3.query.aql
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.3.query.aql
new file mode 100644
index 0000000..87524e0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.3.query.aql
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+
+use dataverse test;
+
+for $t in dataset by_actions
+order by $t.user
+return {
+  "user": $t.user,
+  "header": $t.header
+};

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/112b39ee/asterixdb/asterix-app/src/test/resources/runtimets/results/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.1.adm
b/asterixdb/asterix-app/src/test/resources/runtimets/results/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.1.adm
new file mode 100644
index 0000000..6f83fec
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.1.adm
@@ -0,0 +1,2 @@
+{ "user": "John", "header": "aaa" }
+{ "user": "kereno", "header": "zzz" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/112b39ee/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
index f410cbe..6e9e7ab 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -1934,6 +1934,11 @@
         <output-dir compare="Text">delete-multi-statement</output-dir>
       </compilation-unit>
     </test-case>
+    <test-case FilePath="dml">
+      <compilation-unit name="query-ASTERIXDB-867">
+        <output-dir compare="Text">query-ASTERIXDB-867</output-dir>
+      </compilation-unit>
+    </test-case>
   </test-group>
   <test-group name="employee">
     <test-case FilePath="employee">


Mime
View raw message