You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2016/08/25 20:26:50 UTC
tinkerpop git commit: a nicer message about CPython existence.
Repository: tinkerpop
Updated Branches:
refs/heads/TINKERPOP-1278 b4b8679ed -> e75ca231b
a nicer message about CPython existence.
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/e75ca231
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e75ca231
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e75ca231
Branch: refs/heads/TINKERPOP-1278
Commit: e75ca231bd743d8a54006f76ad835be1b27bacc1
Parents: b4b8679
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Thu Aug 25 14:26:46 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Thu Aug 25 14:26:46 2016 -0600
----------------------------------------------------------------------
.../gremlin/python/driver/DriverRemoteConnectionTest.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e75ca231/gremlin-python/src/test/java/org/apache/tinkerpop/gremlin/python/driver/DriverRemoteConnectionTest.java
----------------------------------------------------------------------
diff --git a/gremlin-python/src/test/java/org/apache/tinkerpop/gremlin/python/driver/DriverRemoteConnectionTest.java b/gremlin-python/src/test/java/org/apache/tinkerpop/gremlin/python/driver/DriverRemoteConnectionTest.java
index 518c303..ba0f5d0 100644
--- a/gremlin-python/src/test/java/org/apache/tinkerpop/gremlin/python/driver/DriverRemoteConnectionTest.java
+++ b/gremlin-python/src/test/java/org/apache/tinkerpop/gremlin/python/driver/DriverRemoteConnectionTest.java
@@ -34,6 +34,7 @@ import java.io.InputStreamReader;
import java.io.Writer;
import java.util.Arrays;
import java.util.List;
+import java.util.Optional;
import java.util.stream.Collectors;
import static org.junit.Assert.assertEquals;
@@ -49,8 +50,12 @@ public class DriverRemoteConnectionTest {
@BeforeClass
public static void setup() {
try {
- PYTHON_EXISTS = new BufferedReader(new InputStreamReader(Runtime.getRuntime().exec("python --version").getErrorStream())).lines().filter(line -> line.trim().startsWith("Python ")).findAny().isPresent();
- System.out.println("Python exists: " + PYTHON_EXISTS);
+ final Optional<String> pythonVersion = new BufferedReader(new InputStreamReader(Runtime.getRuntime().exec("python --version").getErrorStream()))
+ .lines()
+ .filter(line -> line.trim().startsWith("Python "))
+ .findAny();
+ PYTHON_EXISTS = pythonVersion.isPresent();
+ System.out.println("Python virtual machine: " + pythonVersion.orElse("None"));
if (PYTHON_EXISTS)
new GremlinServer(Settings.read(DriverRemoteConnectionTest.class.getResourceAsStream("gremlin-server-modern-secure-py.yaml"))).start().join();
} catch (final Exception ex) {