You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2016/02/25 15:01:01 UTC
[13/43] incubator-tinkerpop git commit: Added an extra assert to
harden GremlinExecutor test
Added an extra assert to harden GremlinExecutor test
Helps validate timeouts weren't occurring in the test as part of the error.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/10c978db
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/10c978db
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/10c978db
Branch: refs/heads/TINKERPOP-1107
Commit: 10c978dbb5a62c4a5cd5ea9adc769e9ba6a8e596
Parents: 26f81b9
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Sat Feb 20 07:17:17 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Sat Feb 20 07:18:57 2016 -0500
----------------------------------------------------------------------
.../tinkerpop/gremlin/groovy/engine/GremlinExecutorTest.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/10c978db/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorTest.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorTest.java b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorTest.java
index 6d6abb4..251d8cf 100644
--- a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorTest.java
+++ b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorTest.java
@@ -635,7 +635,7 @@ public class GremlinExecutorTest {
// test is partially designed to protected against.
assertThat(failed.get(), is(false));
service.shutdown();
- service.awaitTermination(30000, TimeUnit.MILLISECONDS);
+ assertThat(service.awaitTermination(30000, TimeUnit.MILLISECONDS), is(true));
assertEquals(max, futures.size());
futures.forEach(t -> {
@@ -685,12 +685,12 @@ public class GremlinExecutorTest {
}
});
- service.shutdown();
- service.awaitTermination(30000, TimeUnit.MILLISECONDS);
-
// likely a concurrency exception if it occurs - and if it does then we've messed up because that's what this
// test is partially designed to protected against.
assertThat(failed.get(), is(false));
+ service.shutdown();
+ assertThat(service.awaitTermination(30000, TimeUnit.MILLISECONDS), is(true));
+
assertEquals(max, futures.size());
futures.forEach(t -> {
assertEquals(t.getValue0(), t.getValue1().get(0));