File tree Expand file tree Collapse file tree
hugegraph-server/hugegraph-dist/src/assembly/travis Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,14 +55,27 @@ cat >> "$REMOTE_CONFIG" <<EOF
5555
5656username: admin
5757password: pa
58- aliases:
59- g: __g_DEFAULT-hugegraph
6058EOF
6159
6260cat > " $SMOKE_SCRIPT " << EOF
63- :remote connect tinkerpop.server conf/remote.yaml
64- :> def count = g.V().count().next(); if (count < 0L) throw new IllegalStateException("Unexpected vertex count: " + count); "${SMOKE_MARKER} -" + count
65- println(result[0].object)
61+ import org.apache.tinkerpop.gremlin.driver.Cluster
62+
63+ def cluster = Cluster.open('conf/remote.yaml')
64+ def client = cluster.connect().alias(['g': '__g_DEFAULT-hugegraph'])
65+ try {
66+ def remoteScript = '''
67+ def count = g.V().count().next()
68+ if (count < 0L) {
69+ throw new IllegalStateException('Unexpected vertex count: ' + count)
70+ }
71+ '${SMOKE_MARKER} -' + count
72+ '''
73+ def results = client.submit(remoteScript).all().get()
74+ println(results[0].object)
75+ } finally {
76+ client.close()
77+ cluster.close()
78+ }
6679EOF
6780
6881(
You can’t perform that action at this time.
0 commit comments