You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by da...@apache.org on 2017/02/15 18:24:53 UTC
[37/40] tinkerpop git commit: a couple small fixes in tests
a couple small fixes in tests
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/7b58816c
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/7b58816c
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/7b58816c
Branch: refs/heads/TINKERPOP-1599
Commit: 7b58816c26370245c5a30325e663b9e8222dff02
Parents: c2136cd
Author: davebshow <da...@gmail.com>
Authored: Mon Jan 30 20:02:25 2017 -0500
Committer: davebshow <da...@gmail.com>
Committed: Wed Feb 15 13:22:01 2017 -0500
----------------------------------------------------------------------
.../src/main/jython/gremlin_python/driver/protocol.py | 1 -
gremlin-python/src/main/jython/tests/conftest.py | 9 +++++----
gremlin-python/src/main/jython/tests/driver/test_client.py | 5 -----
3 files changed, 5 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7b58816c/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
index 2ace35e..279a8f5 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
@@ -95,7 +95,6 @@ class GremlinServerWSProtocol(AbstractBaseProtocol):
data = self._transport.read()
self.data_received(data, results_dict)
else:
- # result_set.done.set_result(None)
del results_dict[request_id]
else:
del results_dict[request_id]
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7b58816c/gremlin-python/src/main/jython/tests/conftest.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/tests/conftest.py b/gremlin-python/src/main/jython/tests/conftest.py
index 3ab64a8..49779ac 100644
--- a/gremlin-python/src/main/jython/tests/conftest.py
+++ b/gremlin-python/src/main/jython/tests/conftest.py
@@ -31,14 +31,15 @@ from gremlin_python.driver.tornado.transport import TornadoTransport
@pytest.fixture
def connection(request):
+ protocol = GremlinServerWSProtocol(
+ username='stephen', password='password')
+ executor = concurrent.futures.ThreadPoolExecutor(5)
+ pool = queue.Queue()
try:
- protocol = GremlinServerWSProtocol(
- username='stephen', password='password')
- executor = concurrent.futures.ThreadPoolExecutor(5)
- pool = queue.Queue()
conn = Connection('ws://localhost:45940/gremlin', 'g', protocol,
lambda: TornadoTransport(), executor, pool)
except:
+ executor.shutdown()
pytest.skip('Gremlin Server is not running')
else:
def fin():
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7b58816c/gremlin-python/src/main/jython/tests/driver/test_client.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/tests/driver/test_client.py b/gremlin-python/src/main/jython/tests/driver/test_client.py
index 6395d7b..2e0e96c 100644
--- a/gremlin-python/src/main/jython/tests/driver/test_client.py
+++ b/gremlin-python/src/main/jython/tests/driver/test_client.py
@@ -41,7 +41,6 @@ def test_client(client):
message = RequestMessage('traversal', 'bytecode', {'gremlin': t.bytecode})
result_set = client.submit(message)
assert len(result_set.all().result()) == 6
- client.close()
def test_iterate_result_set(client):
g = Graph().traversal()
@@ -52,7 +51,6 @@ def test_iterate_result_set(client):
for result in result_set:
results += result
assert len(results) == 6
- client.close()
def test_client_async(client):
g = Graph().traversal()
@@ -62,7 +60,6 @@ def test_client_async(client):
assert not future.done()
result_set = future.result()
assert len(result_set.all().result()) == 6
- client.close()
def test_connection_share(client):
# Overwrite fixture with pool_size=1 client
@@ -80,7 +77,6 @@ def test_connection_share(client):
assert future.done()
result_set = future.result()
assert len(result_set.all().result()) == 6
- client.close()
def test_multi_conn_pool(client):
g = Graph().traversal()
@@ -95,4 +91,3 @@ def test_multi_conn_pool(client):
# with connection pool `future` may or may not be done here
result_set = future.result()
assert len(result_set.all().result()) == 6
- client.close()