Repository: asterixdb
Updated Branches:
  refs/heads/master f75e51c2f -> c2d296f54


ASTERIXDB-1310 Autogenerated uuid

Added test case for how to use autogenerated uuid with feed properly.

Change-Id: Ief4fba8a7227a40c5d22293758cbdf4575b14401
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1601
Sonar-Qube: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
BAD: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Reviewed-by: Steven Jacobs <sjaco...@ucr.edu>
Reviewed-by: abdullah alamoudi <bamou...@gmail.com>
Integration-Tests: Jenkins <jenk...@fulliautomatix.ics.uci.edu>


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

Branch: refs/heads/master
Commit: c2d296f54b553225e5b1a4aa48c45eb71e65b50f
Parents: f75e51c
Author: Xikui Wang <xkk...@gmail.com>
Authored: Wed Mar 22 14:01:29 2017 -0700
Committer: Xikui Wang <xkk...@gmail.com>
Committed: Fri Mar 24 17:57:34 2017 -0700

----------------------------------------------------------------------
 .../feed-push-socket.4.sleep.aql                |  2 +-
 .../push-socket-with-auuid.1.ddl.aql            | 71 ++++++++++++++++++++
 .../push-socket-with-auuid.2.update.aql         | 35 ++++++++++
 .../push-socket-with-auuid.3.server.aql         | 27 ++++++++
 .../push-socket-with-auuid.4.sleep.aql          | 27 ++++++++
 .../push-socket-with-auuid.5.update.aql         | 32 +++++++++
 .../push-socket-with-auuid.6.query.aql          | 37 ++++++++++
 .../push-socket-with-auuid.7.server.aql         | 28 ++++++++
 .../push-socket-with-auuid.8.ddl.aql            | 29 ++++++++
 .../push-socket-with-auuid.1.adm                |  3 +
 .../src/test/resources/runtimets/testsuite.xml  |  5 ++
 11 files changed, 295 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2d296f5/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-push-socket/feed-push-socket.4.sleep.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-push-socket/feed-push-socket.4.sleep.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-push-socket/feed-push-socket.4.sleep.aql
index 18bbbbc..ce879ef 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-push-socket/feed-push-socket.4.sleep.aql
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-push-socket/feed-push-socket.4.sleep.aql
@@ -23,4 +23,4 @@
  * Expected Res : Success
  * Date         : 24th Feb 2016
  */
-10000
\ No newline at end of file
+5000
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2d296f5/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.1.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.1.ddl.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.1.ddl.aql
new file mode 100644
index 0000000..d234ecf
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.1.ddl.aql
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+/*
+ * Description  : Create a socket feed with datatype without auuid and connect
+ * it to three different datasets with different datatype: one with auuid, one
+ * open datatype with auuid and one without auuid using one of the attribute
+ * as primary key.
+ * Expected Res : Success
+ * Date         : 20th Mar 2017
+ */
+drop dataverse experiments if exists;
+create dataverse experiments;
+use dataverse experiments;
+
+create type DBLPFeedType as closed {
+  dblpid: string,
+  title: string,
+  authors: string,
+  misc: string
+}
+
+create type DBLPType0 as open {
+  id: uuid,
+  dblpid: string,
+  title: string,
+  authors: string,
+  misc: string
+}
+
+create type DBLPType1 as closed {
+  id: uuid,
+  dblpid: string,
+  title: string,
+  authors: string,
+  misc: string
+}
+
+create type DBLPType2 as closed {
+  dblpid: string,
+  title: string,
+  authors: string,
+  misc: string
+}
+
+create dataset DBLP0(DBLPType0) primary key id autogenerated;
+create dataset DBLP1(DBLPType1) primary key id autogenerated;
+create dataset DBLP2(DBLPType2) primary key dblpid;
+
+create feed DBLPFeed using socket_adapter
+(
+    ("sockets"="127.0.0.1:10001"),
+    ("address-type"="IP"),
+    ("type-name"="DBLPFeedType"),
+    ("format"="adm")
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2d296f5/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.2.update.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.2.update.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.2.update.aql
new file mode 100644
index 0000000..d15eaae
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.2.update.aql
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+/*
+ * Description  : Create a socket feed with datatype without auuid and connect
+ * it to three different datasets with different datatype: one with auuid, one
+ * open datatype with auuid and one without auuid using one of the attribute
+ * as primary key.
+ * Expected Res : Success
+ * Date         : 20th Mar 2017
+ */
+
+use dataverse experiments;
+set wait-for-completion-feed "false";
+
+connect feed DBLPFeed to dataset DBLP0;
+connect feed DBLPFeed to dataset DBLP1;
+connect feed DBLPFeed to dataset DBLP2;
+
+start feed DBLPFeed;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2d296f5/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.3.server.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.3.server.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.3.server.aql
new file mode 100644
index 0000000..a9282f3
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.3.server.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.
+ */
+/*
+ * Description  : Create a socket feed with datatype without auuid and connect
+ * it to three different datasets with different datatype: one with auuid, one
+ * open datatype with auuid and one without auuid using one of the attribute
+ * as primary key.
+ * Expected Res : Success
+ * Date         : 20th Mar 2017
+ */
+start client 10001 file-client 127.0.0.1 
../asterix-app/data/pub-small/dblp-small-id-autogenerated-pk.adm 500 50 1000
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2d296f5/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.4.sleep.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.4.sleep.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.4.sleep.aql
new file mode 100644
index 0000000..fd74a77
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.4.sleep.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.
+ */
+/*
+ * Description  : Create a socket feed with datatype without auuid and connect
+ * it to three different datasets with different datatype: one with auuid, one
+ * open datatype with auuid and one without auuid using one of the attribute
+ * as primary key.
+ * Expected Res : Success
+ * Date         : 20th Mar 2017
+ */
+5000
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2d296f5/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.5.update.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.5.update.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.5.update.aql
new file mode 100644
index 0000000..259f194
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.5.update.aql
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+/*
+ * Description  : Create a socket feed with datatype without auuid and connect
+ * it to three different datasets with different datatype: one with auuid, one
+ * open datatype with auuid and one without auuid using one of the attribute
+ * as primary key.
+ * Expected Res : Success
+ * Date         : 20th Mar 2017
+ */
+
+use dataverse experiments;
+stop feed DBLPFeed;
+disconnect feed DBLPFeed from dataset DBLP0;
+disconnect feed DBLPFeed from dataset DBLP1;
+disconnect feed DBLPFeed from dataset DBLP2;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2d296f5/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.6.query.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.6.query.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.6.query.aql
new file mode 100644
index 0000000..c72508d
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.6.query.aql
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+/*
+ * Description  : Create a socket feed with datatype without auuid and connect
+ * it to three different datasets with different datatype: one with auuid, one
+ * open datatype with auuid and one without auuid using one of the attribute
+ * as primary key.
+ * Expected Res : Success
+ * Date         : 20th Mar 2017
+ */
+
+use dataverse experiments;
+
+count(for $o in dataset DBLP0
+return $o);
+
+count(for $o in dataset DBLP1
+return $o);
+
+count(for $o in dataset DBLP2
+return $o);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2d296f5/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.7.server.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.7.server.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.7.server.aql
new file mode 100644
index 0000000..c3271b4
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.7.server.aql
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+/*
+ * Description  : Create a socket feed with datatype without auuid and connect
+ * it to three different datasets with different datatype: one with auuid, one
+ * open datatype with auuid and one without auuid using one of the attribute
+ * as primary key.
+ * Expected Res : Success
+ * Date         : 20th Mar 2017
+ */
+
+stop 10001
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2d296f5/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.8.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.8.ddl.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.8.ddl.aql
new file mode 100644
index 0000000..8cec7db
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.8.ddl.aql
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ */
+/*
+ * Description  : Create a socket feed with datatype without auuid and connect
+ * it to three different datasets with different datatype: one with auuid, one
+ * open datatype with auuid and one without auuid using one of the attribute
+ * as primary key.
+ * Expected Res : Success
+ * Date         : 20th Mar 2017
+ */
+
+use dataverse experiments;
+drop dataverse experiments;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2d296f5/asterixdb/asterix-app/src/test/resources/runtimets/results/feeds/push-socket-with-auuid/push-socket-with-auuid.1.adm
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/feeds/push-socket-with-auuid/push-socket-with-auuid.1.adm
 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/feeds/push-socket-with-auuid/push-socket-with-auuid.1.adm
new file mode 100644
index 0000000..51fdf04
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/feeds/push-socket-with-auuid/push-socket-with-auuid.1.adm
@@ -0,0 +1,3 @@
+10
+10
+10

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c2d296f5/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 e65759c..4e669c5 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -291,6 +291,11 @@
         <expected-error>Feed TweetFeed is not started.</expected-error>
       </compilation-unit>
     </test-case>
+    <test-case FilePath="feeds">
+      <compilation-unit name="push-socket-with-auuid">
+        <output-dir compare="Text">push-socket-with-auuid</output-dir>
+      </compilation-unit>
+    </test-case>
   </test-group>
   <test-group name="upsert">
     <test-case FilePath="upsert">

Reply via email to