tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [1/8] incubator-tinkerpop git commit: Renamed test so that it is actually an integration test.
Date Sat, 12 Mar 2016 00:53:58 GMT
Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-575 0a46b285c -> 6c438f43f


Renamed test so that it is actually an integration test.

Added generate-all.groovy for the RemoteServer integration testing.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/7e758275
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/7e758275
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/7e758275

Branch: refs/heads/TINKERPOP-575
Commit: 7e7582756325aeda86096a07aec4e6fb42532deb
Parents: 0a46b28
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Fri Mar 11 18:10:27 2016 -0500
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Fri Mar 11 18:10:27 2016 -0500

----------------------------------------------------------------------
 gremlin-server/scripts/generate-all.groovy      | 32 +++++++++++++
 .../gremlin/server/WithServerIntegrateTest.java | 49 ++++++++++++++++++++
 .../server/WithServerIntegrationTest.java       | 49 --------------------
 3 files changed, 81 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/7e758275/gremlin-server/scripts/generate-all.groovy
----------------------------------------------------------------------
diff --git a/gremlin-server/scripts/generate-all.groovy b/gremlin-server/scripts/generate-all.groovy
new file mode 100644
index 0000000..ec3ab69
--- /dev/null
+++ b/gremlin-server/scripts/generate-all.groovy
@@ -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.
+ */
+
+// an init script that returns a Map allows explicit setting of global bindings.
+def globals = [:]
+
+// Generates the modern graph into an "empty" TinkerGraph via LifeCycleHook.
+// Note that the name of the key in the "global" map is unimportant.
+globals << [hook : [
+  onStartUp: { ctx ->
+    TinkerFactory.generateClassic(classic)
+    TinkerFactory.generateModern(modern)
+    TinkerFactory.generateTheCrew(crew)
+    grateful.io(gryo()).readGraph('../data/grateful-dead.kryo')
+  }
+] as LifeCycleHook]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/7e758275/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/WithServerIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/WithServerIntegrateTest.java
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/WithServerIntegrateTest.java
new file mode 100644
index 0000000..683a164
--- /dev/null
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/WithServerIntegrateTest.java
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+package org.apache.tinkerpop.gremlin.server;
+
+import org.apache.tinkerpop.gremlin.driver.Cluster;
+import org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteConnection;
+import org.apache.tinkerpop.gremlin.process.remote.RemoteGraph;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
+import org.junit.Test;
+
+import java.util.Collections;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class WithServerIntegrateTest extends AbstractGremlinServerIntegrationTest {
+    @Override
+    public Settings overrideSettings(final Settings settings) {
+        settings.scriptEngines.get("gremlin-groovy").scripts = Collections.singletonList("scripts/generate-modern.groovy");
+        return settings;
+    }
+
+    @Test
+    public void shouldDoServerGraphReturningVertices() {
+        final Cluster cluster = Cluster.open();
+        final Graph graph = RemoteGraph.open(DriverRemoteConnection.using(cluster), TinkerGraph.class);
+        final GraphTraversalSource g = graph.traversal();
+        g.V().forEachRemaining(v -> System.out.println("TEST: " + v.toString()));
+        cluster.close();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/7e758275/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/WithServerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/WithServerIntegrationTest.java
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/WithServerIntegrationTest.java
deleted file mode 100644
index 40c8f8a..0000000
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/WithServerIntegrationTest.java
+++ /dev/null
@@ -1,49 +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.
- */
-package org.apache.tinkerpop.gremlin.server;
-
-import org.apache.tinkerpop.gremlin.driver.Cluster;
-import org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteConnection;
-import org.apache.tinkerpop.gremlin.process.remote.RemoteGraph;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
-import org.junit.Test;
-
-import java.util.Collections;
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- */
-public class WithServerIntegrationTest extends AbstractGremlinServerIntegrationTest {
-    @Override
-    public Settings overrideSettings(final Settings settings) {
-        settings.scriptEngines.get("gremlin-groovy").scripts = Collections.singletonList("scripts/generate-modern.groovy");
-        return settings;
-    }
-
-    @Test
-    public void shouldDoServerGraphReturningVertices() {
-        final Cluster cluster = Cluster.open();
-        final Graph graph = RemoteGraph.open(DriverRemoteConnection.using(cluster), TinkerGraph.class);
-        final GraphTraversalSource g = graph.traversal();
-        g.V().forEachRemaining(v -> System.out.println("TEST: " + v.toString()));
-        cluster.close();
-    }
-}


Mime
View raw message