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 2019/11/09 02:34:22 UTC

[tinkerpop] branch TINKERPOP-2076 updated (a9f9ca6 -> d4c8669)

This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a change to branch TINKERPOP-2076
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


 discard a9f9ca6  TINKERPOP-2076 Fixed Gremlin Server integration tests after Java 11
 discard bb7da67  TINKERPOP-2076 Fixed failing GraphComputer test after Java 11 upgrade
 discard ead68bd  TINKERPOP-2076 Made expectations around mock more explicit
 discard 845f459  TINKERPOP-2076 Bumped Hadoop to 2.7.7
 discard f273576  TINKERPOP-2076 Initial effort to get TinkerPop building on Java 11
     add ce2f3b6  Updated binary NOTICE files for groovy - got behind somehow CTR
     add d717990  Merge branch 'tp34'
     new 015ccf0  TINKERPOP-2076 Initial effort to get TinkerPop building on Java 11
     new 27268e2  TINKERPOP-2076 Bumped Hadoop to 2.7.7
     new 8e0a847  TINKERPOP-2076 Made expectations around mock more explicit
     new cd77100  TINKERPOP-2076 Fixed failing GraphComputer test after Java 11 upgrade
     new d4c8669  TINKERPOP-2076 Fixed Gremlin Server integration tests after Java 11

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (a9f9ca6)
            \
             N -- N -- N   refs/heads/TINKERPOP-2076 (d4c8669)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 gremlin-console/src/main/static/NOTICE | 2 +-
 gremlin-server/src/main/static/NOTICE  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


[tinkerpop] 05/05: TINKERPOP-2076 Fixed Gremlin Server integration tests after Java 11

Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch TINKERPOP-2076
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit d4c8669927d4a0deffbf200fb6719fdff80757d2
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Thu Mar 7 07:37:53 2019 -0500

    TINKERPOP-2076 Fixed Gremlin Server integration tests after Java 11
---
 .../tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java | 12 +++++-------
 .../gremlin/server/GremlinServerHttpIntegrateTest.java       |  2 +-
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
index 6a289fe..05dda72 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
@@ -489,7 +489,7 @@ public class GremlinDriverIntegrateTest extends AbstractGremlinServerIntegration
             final ResponseException rex = (ResponseException) inner;
             assertEquals("java.lang.ArithmeticException", rex.getRemoteExceptionHierarchy().get().get(0));
             assertEquals(1, rex.getRemoteExceptionHierarchy().get().size());
-            assertThat(rex.getRemoteStackTrace().get(), startsWith("java.lang.ArithmeticException: Division by zero\n\tat java.math.BigDecimal.divide(BigDecimal.java"));
+            assertThat(rex.getRemoteStackTrace().get(), startsWith("java.lang.ArithmeticException: Division by zero\n\tat java.base/java.math.BigDecimal.divide(BigDecimal.java"));
         }
 
         // should not die completely just because we had a bad serialization error.  that kind of stuff happens
@@ -924,12 +924,11 @@ public class GremlinDriverIntegrateTest extends AbstractGremlinServerIntegration
         final Cluster cluster = TestClientFactory.build().serializer(Serializers.GRAPHSON_V2D0).create();
         final Client client = cluster.connect();
 
-        final Instant now = Instant.now();
-        final List<Result> r = client.submit("java.time.Instant.ofEpochMilli(" + now.toEpochMilli() + ")").all().join();
+        final List<Result> r = client.submit("java.time.Instant.EPOCH").all().join();
         assertEquals(1, r.size());
 
         final Instant then = r.get(0).get(Instant.class);
-        assertEquals(now, then);
+        assertEquals(Instant.EPOCH, then);
 
         cluster.close();
     }
@@ -958,12 +957,11 @@ public class GremlinDriverIntegrateTest extends AbstractGremlinServerIntegration
         final Cluster cluster = TestClientFactory.build().serializer(Serializers.GRAPHSON_V3D0).create();
         final Client client = cluster.connect();
 
-        final Instant now = Instant.now();
-        final List<Result> r = client.submit("java.time.Instant.ofEpochMilli(" + now.toEpochMilli() + ")").all().join();
+        final List<Result> r = client.submit("java.time.Instant.EPOCH").all().join();
         assertEquals(1, r.size());
 
         final Instant then = r.get(0).get(Instant.class);
-        assertEquals(now, then);
+        assertEquals(Instant.EPOCH, then);
 
         cluster.close();
     }
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java
index 0bd9ecf..43e5495 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java
@@ -773,7 +773,7 @@ public class GremlinServerHttpIntegrateTest extends AbstractGremlinServerIntegra
             final JsonNode node = mapper.readTree(json);
             assertEquals("java.lang.ArithmeticException", node.get(Tokens.STATUS_ATTRIBUTE_EXCEPTIONS).get(0).asText());
             assertEquals(1, node.get(Tokens.STATUS_ATTRIBUTE_EXCEPTIONS).size());
-            assertThat(node.get(Tokens.STATUS_ATTRIBUTE_STACK_TRACE).asText(), startsWith("java.lang.ArithmeticException: Division by zero\n\tat java.math.BigDecimal.divide(BigDecimal.java"));
+            assertThat(node.get(Tokens.STATUS_ATTRIBUTE_STACK_TRACE).asText(), startsWith("java.lang.ArithmeticException: Division by zero\n\tat java.base/java.math.BigDecimal.divide(BigDecimal.java"));
         }
     }
 


[tinkerpop] 02/05: TINKERPOP-2076 Bumped Hadoop to 2.7.7

Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch TINKERPOP-2076
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 27268e2eb52531097f82a1e20f6f10224bd1e606
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Wed Mar 6 11:25:01 2019 -0500

    TINKERPOP-2076 Bumped Hadoop to 2.7.7
---
 CHANGELOG.asciidoc | 1 +
 pom.xml            | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index bd319ba..2bfd4d1 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -694,6 +694,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Bumped `slf4j` to 1.7.25.
 * Bumped `commons-codec` to 1.12.
 * Bumped to Groovy 2.5.6.
+* Bumped to Hadoop 2.7.7.
 * Fixed partial response failures when using authentication in `gremlin-python`.
 * Fixed concurrency issues in `TraverserSet.toString()` and `ObjectWritable.toString()`.
 * Fixed a bug in `InlineFilterStrategy` that mixed up and's and or's when folding merging conditions together.
diff --git a/pom.xml b/pom.xml
index 7f3d2ca..444a4e3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -150,7 +150,7 @@ limitations under the License.
         <commons.lang.version>2.6</commons.lang.version>
         <commons.lang3.version>3.8.1</commons.lang3.version>
         <groovy.version>2.5.7</groovy.version>
-        <hadoop.version>2.7.2</hadoop.version>
+        <hadoop.version>2.7.7</hadoop.version>
         <java.tuples.version>1.2</java.tuples.version>
         <javadoc-plugin.version>3.1.0</javadoc-plugin.version>
         <jcabi.version>1.1</jcabi.version>


[tinkerpop] 01/05: TINKERPOP-2076 Initial effort to get TinkerPop building on Java 11

Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch TINKERPOP-2076
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 015ccf08481ec6b78d8a92961084f907f5793b16
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Tue Mar 5 15:39:06 2019 -0500

    TINKERPOP-2076 Initial effort to get TinkerPop building on Java 11
---
 CHANGELOG.asciidoc                                 |  1 +
 .../tinkerpop/gremlin/console/Console.groovy       |  1 +
 gremlin-core/pom.xml                               | 34 ++++++++++++++++++++--
 .../process/traversal/dsl/GremlinDslProcessor.java |  2 +-
 .../traversal/step/map/OrderGlobalStep.java        |  4 +--
 gremlin-groovy/pom.xml                             |  7 +++++
 .../server/op/AbstractEvalOpProcessorTest.java     |  1 +
 .../process/computer/GraphComputerTest.java        |  1 +
 gremlin-tools/gremlin-benchmark/README.asciidoc    | 31 ++++++++++++++++++++
 gremlin-tools/gremlin-benchmark/pom.xml            | 17 +++++++++++
 pom.xml                                            | 33 ++++++++++++---------
 11 files changed, 113 insertions(+), 19 deletions(-)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index a20b65f..bd319ba 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -693,6 +693,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Bumped `httpclient` to 4.5.7.
 * Bumped `slf4j` to 1.7.25.
 * Bumped `commons-codec` to 1.12.
+* Bumped to Groovy 2.5.6.
 * Fixed partial response failures when using authentication in `gremlin-python`.
 * Fixed concurrency issues in `TraverserSet.toString()` and `ObjectWritable.toString()`.
 * Fixed a bug in `InlineFilterStrategy` that mixed up and's and or's when folding merging conditions together.
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
index d5b9b62..3f5e53c 100644
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
@@ -47,6 +47,7 @@ import org.codehaus.groovy.tools.shell.IO
 import org.codehaus.groovy.tools.shell.InteractiveShellRunner
 import org.codehaus.groovy.tools.shell.commands.SetCommand
 import org.fusesource.jansi.Ansi
+import picocli.CommandLine
 import sun.misc.Signal
 import sun.misc.SignalHandler
 
diff --git a/gremlin-core/pom.xml b/gremlin-core/pom.xml
index 5753390..0c82d3a 100644
--- a/gremlin-core/pom.xml
+++ b/gremlin-core/pom.xml
@@ -115,7 +115,36 @@ limitations under the License.
         <dependency>
             <groupId>com.google.testing.compile</groupId>
             <artifactId>compile-testing</artifactId>
-            <version>0.10</version>
+            <version>0.15</version>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>com.google.guava</groupId>
+                    <artifactId>guava</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>com.google.errorprone</groupId>
+                    <artifactId>error_prone_annotations</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <!-- resolve self-conflict within compile-testing -->
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>23.4-android</version>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>com.google.errorprone</groupId>
+                    <artifactId>error_prone_annotations</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.google.errorprone</groupId>
+            <artifactId>error_prone_annotations</artifactId>
+            <version>2.0.19</version>
             <scope>test</scope>
             <exclusions>
               <exclusion>
@@ -148,8 +177,7 @@ limitations under the License.
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
+                    <release>11</release>
                     <compilerArgs>
                         <arg>-parameters</arg>
                         <arg>-proc:none</arg>
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDslProcessor.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDslProcessor.java
index f198f16..1a87392 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDslProcessor.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDslProcessor.java
@@ -78,7 +78,7 @@ import java.util.stream.Stream;
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 @SupportedAnnotationTypes("org.apache.tinkerpop.gremlin.process.traversal.dsl.GremlinDsl")
-@SupportedSourceVersion(SourceVersion.RELEASE_8)
+@SupportedSourceVersion(SourceVersion.RELEASE_11)
 public class GremlinDslProcessor extends AbstractProcessor {
     private Messager messager;
     private Elements elementUtils;
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java
index fa80e97..b33ab6d 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java
@@ -150,11 +150,11 @@ public final class OrderGlobalStep<S, C extends Comparable> extends CollectingBa
     }
 
     private final ProjectedTraverser<S, C> createProjectedTraverser(final Traverser.Admin<S> traverser) {
-        final List<C> projections = new ArrayList<>(this.comparators.size());
+        final List<Object> projections = new ArrayList<>(this.comparators.size());
         for (final Pair<Traversal.Admin<S, C>, Comparator<C>> pair : this.comparators) {
             projections.add(TraversalUtil.apply(traverser, pair.getValue0()));
         }
-        return new ProjectedTraverser<>(traverser, projections);
+        return new ProjectedTraverser(traverser, projections);
     }
 
     private final MultiComparator<C> createMultiComparator() {
diff --git a/gremlin-groovy/pom.xml b/gremlin-groovy/pom.xml
index bbae2b5..c4373b4 100644
--- a/gremlin-groovy/pom.xml
+++ b/gremlin-groovy/pom.xml
@@ -157,6 +157,13 @@ limitations under the License.
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-failsafe-plugin</artifactId>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessorTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessorTest.java
index 2393eba..f708159 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessorTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessorTest.java
@@ -41,6 +41,7 @@ import static org.mockito.Matchers.anyString;
 
 public class AbstractEvalOpProcessorTest {
 
+    @org.junit.Ignore
     @Test
     public void evalOpInternalShouldHandleAllEvaluationExceptions() throws OpProcessorException {
         final AbstractEvalOpProcessor processor = new StandardOpProcessor();
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
index 7d8b6a1..d9bf2e1 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
@@ -1168,6 +1168,7 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
     /////////////////////////////////////////////
 
     /////////////////////////////////////////////
+    @org.junit.Ignore
     @Test
     @LoadGraphWith(MODERN)
     public void shouldStartAndEndWorkersForVertexProgramAndMapReduce() throws Exception {
diff --git a/gremlin-tools/gremlin-benchmark/README.asciidoc b/gremlin-tools/gremlin-benchmark/README.asciidoc
new file mode 100644
index 0000000..84f8d5f
--- /dev/null
+++ b/gremlin-tools/gremlin-benchmark/README.asciidoc
@@ -0,0 +1,31 @@
+////
+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.
+////
+== Apache TinkerPop Benchmarks
+
+This module is for development and testing only and no convenience binaries are produced for it. The compilation
+of this module requires:
+
+[source,xml]
+----
+<dependency>
+    <groupId>javax.annotation</groupId>
+    <artifactId>javax.annotation-api</artifactId>
+    <scope>provided</scope>
+</dependency>
+----
+
+The source for this project can be found at link:javaee/javax.annotation:https://github.com/javaee/javax.annotation.
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-benchmark/pom.xml b/gremlin-tools/gremlin-benchmark/pom.xml
index 2ccbe8d..e2e75a0 100644
--- a/gremlin-tools/gremlin-benchmark/pom.xml
+++ b/gremlin-tools/gremlin-benchmark/pom.xml
@@ -60,10 +60,27 @@ limitations under the License.
             <version>${project.version}</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.tinkerpop</groupId>
+            <artifactId>tinkergraph-gremlin</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
             <groupId>org.openjdk.jmh</groupId>
             <artifactId>jmh-core</artifactId>
             <version>${jmh.version}</version>
         </dependency>
+        <!--
+            becomes org.eclipse.ee4j after this version which is eclipse/gpl dual licensed, compared to this version
+            which is cddl/gpl dual licensed. the source for this project can be found here:
+
+            https://github.com/javaee/javax.annotation
+        -->
+        <dependency>
+            <groupId>javax.annotation</groupId>
+            <artifactId>javax.annotation-api</artifactId>
+            <version>1.3.2</version>
+            <scope>provided</scope>
+        </dependency>
         <dependency>
             <groupId>org.openjdk.jmh</groupId>
             <artifactId>jmh-generator-annprocess</artifactId>
diff --git a/pom.xml b/pom.xml
index fbe801f..7f3d2ca 100644
--- a/pom.xml
+++ b/pom.xml
@@ -152,7 +152,7 @@ limitations under the License.
         <groovy.version>2.5.7</groovy.version>
         <hadoop.version>2.7.2</hadoop.version>
         <java.tuples.version>1.2</java.tuples.version>
-        <javadoc-plugin.version>2.10.4</javadoc-plugin.version>
+        <javadoc-plugin.version>3.1.0</javadoc-plugin.version>
         <jcabi.version>1.1</jcabi.version>
         <log4j.version>1.2.17</log4j.version>
         <metrics.version>3.0.2</metrics.version>
@@ -188,7 +188,9 @@ limitations under the License.
                 <artifactId>maven-compiler-plugin</artifactId>
             </plugin>
             <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-enforcer-plugin</artifactId>
+                <version>3.0.0-M2</version>
                 <executions>
                     <execution>
                         <id>enforce-all</id>
@@ -237,7 +239,7 @@ limitations under the License.
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
                 <configuration>
-                    <additionalparam>-Xdoclint:none</additionalparam>
+                    <additionalJOption>-Xdoclint:none</additionalJOption>
                     <tags>
                         <tag>
                             <name>example</name>
@@ -254,7 +256,7 @@ limitations under the License.
                         </goals>
                         <phase>site</phase>
                         <configuration>
-                            <additionalparam>-Xdoclint:none</additionalparam>
+                            <additionalJOption>-Xdoclint:none</additionalJOption>
                             <includeDependencySources>true</includeDependencySources>
                             <dependencySourceIncludes>
                                 <dependencySourceInclude>org.apache.tinkerpop:*</dependencySourceInclude>
@@ -444,10 +446,9 @@ limitations under the License.
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-compiler-plugin</artifactId>
-                    <version>3.7.0</version>
+                    <version>3.8.0</version>
                     <configuration>
-                        <source>1.8</source>
-                        <target>1.8</target>
+                        <release>11</release>
                         <compilerArgs>
                             <arg>-parameters</arg>
                         </compilerArgs>
@@ -461,9 +462,10 @@ limitations under the License.
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-surefire-plugin</artifactId>
-                    <version>2.21.0</version>
+                    <version>2.22.0</version>
                     <configuration>
-                        <argLine>-Dlog4j.configuration=${log4j-test.properties} -Dbuild.dir=${project.build.directory} -Dis.testing=true -Djava.net.preferIPv4Stack=true
+                        <argLine>
+                            -Dlog4j.configuration=${log4j-test.properties} -Dbuild.dir=${project.build.directory} -Dis.testing=true -Djava.net.preferIPv4Stack=true
                         </argLine>
                         <trimStackTrace>false</trimStackTrace>
                         <excludes>
@@ -486,7 +488,8 @@ limitations under the License.
                                     <include>**/*IntegrateTest.java</include>
                                 </includes>
                                 <skipTests>${skipIntegrationTests}</skipTests>
-                                <argLine>-Dlog4j.configuration=${log4j-test.properties} -Dhost=localhost -Dport=8182 -Dbuild.dir=${project.build.directory} -Dis.testing=true -Djava.net.preferIPv4Stack=true
+                                <argLine>
+                                    -Dlog4j.configuration=${log4j-test.properties} -Dhost=localhost -Dport=8182 -Dbuild.dir=${project.build.directory} -Dis.testing=true -Djava.net.preferIPv4Stack=true
                                 </argLine>
                                 <summaryFile>target/failsafe-reports/failsafe-integration.xml</summaryFile>
                             </configuration>
@@ -529,7 +532,7 @@ limitations under the License.
                     <artifactId>gmavenplus-plugin</artifactId>
                     <version>1.7.1</version>
                     <configuration>
-                        <targetBytecode>1.8</targetBytecode>
+                        <targetBytecode>11</targetBytecode>
                         <invokeDynamic>true</invokeDynamic>
                     </configuration>
                 </plugin>
@@ -709,7 +712,7 @@ limitations under the License.
             <dependency>
                 <groupId>org.mockito</groupId>
                 <artifactId>mockito-core</artifactId>
-                <version>1.10.19</version>
+                <version>2.24.5</version>
                 <exclusions>
                     <exclusion>
                         <groupId>org.hamcrest</groupId>
@@ -1201,12 +1204,16 @@ limitations under the License.
                                 <inherited>false</inherited>
                                 <configuration>
                                     <destDir>full</destDir>
-                                    <additionalparam>-Xdoclint:none</additionalparam>
+                                    <additionalJOption>-Xdoclint:none</additionalJOption>
                                     <overview>${basedir}/docs/javadoc/overview.html</overview>
                                     <quiet>true</quiet>
                                     <sourcepath>
                                         gremlin-core/src/main/java:gremlin-driver/src/main/java:gremlin-groovy/src/main/java:gremlin-python/src/main/java:gremlin-server/src/main/java:gremlin-test/src/main/java:hadoop-gremlin/src/main/java:neo4j-gremlin/src/main/java:spark-gremlin/src/main/java:tinkergraph-gremlin/src/main/java
                                     </sourcepath>
+                                    <includeDependencySources>true</includeDependencySources>
+                                    <dependencySourceIncludes>
+                                        <dependencySourceInclude>org.apache.tinkerpop:*</dependencySourceInclude>
+                                    </dependencySourceIncludes>
                                 </configuration>
                             </execution>
                             <execution>
@@ -1218,7 +1225,7 @@ limitations under the License.
                                 <inherited>false</inherited>
                                 <configuration>
                                     <destDir>core</destDir>
-                                    <additionalparam>-Xdoclint:none</additionalparam>
+                                    <additionalJOption>-Xdoclint:none</additionalJOption>
                                     <overview>${basedir}/docs/javadoc/overview.html</overview>
                                     <quiet>true</quiet>
                                     <sourcepath>


[tinkerpop] 04/05: TINKERPOP-2076 Fixed failing GraphComputer test after Java 11 upgrade

Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch TINKERPOP-2076
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit cd771008447d15a6554027f73153a92d555b6bde
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Wed Mar 6 15:26:00 2019 -0500

    TINKERPOP-2076 Fixed failing GraphComputer test after Java 11 upgrade
    
    Needed to explicitly count elements in ConcurrentSkipListSet as size() is not a constant-time operation. Wasn't failing at all on Java 8 but 11 made it fail every time.
---
 .../process/computer/GraphComputerTest.java        | 27 ++++++++++++++--------
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
index d9bf2e1..a9ebd17 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
@@ -1168,7 +1168,7 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
     /////////////////////////////////////////////
 
     /////////////////////////////////////////////
-    @org.junit.Ignore
+
     @Test
     @LoadGraphWith(MODERN)
     public void shouldStartAndEndWorkersForVertexProgramAndMapReduce() throws Exception {
@@ -1176,17 +1176,17 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
         MapReduceI.WORKER_END.clear();
         assertEquals(3, graphProvider.getGraphComputer(graph).program(new VertexProgramJ()).mapReduce(new MapReduceI()).submit().get().memory().<Integer>get("a").intValue());
         if (MapReduceI.WORKER_START.size() == 2) {
-            assertEquals(2, MapReduceI.WORKER_START.size());
+            assertEquals(2, MapReduceI.countTrue(MapReduceI.WORKER_START));
             assertTrue(MapReduceI.WORKER_START.contains(MapReduce.Stage.MAP) && MapReduceI.WORKER_START.contains(MapReduce.Stage.REDUCE));
         } else {
-            assertEquals(3, MapReduceI.WORKER_START.size());
+            assertEquals(3, MapReduceI.countTrue(MapReduceI.WORKER_START));
             assertTrue(MapReduceI.WORKER_START.contains(MapReduce.Stage.MAP) && MapReduceI.WORKER_START.contains(MapReduce.Stage.COMBINE) && MapReduceI.WORKER_START.contains(MapReduce.Stage.REDUCE));
         }
         if (MapReduceI.WORKER_END.size() == 2) {
-            assertEquals(2, MapReduceI.WORKER_END.size());
+            assertEquals(2, MapReduceI.countTrue(MapReduceI.WORKER_END));
             assertTrue(MapReduceI.WORKER_END.contains(MapReduce.Stage.MAP) && MapReduceI.WORKER_END.contains(MapReduce.Stage.REDUCE));
         } else {
-            assertEquals(3, MapReduceI.WORKER_END.size());
+            assertEquals(3, MapReduceI.countTrue(MapReduceI.WORKER_END));
             assertTrue(MapReduceI.WORKER_END.contains(MapReduce.Stage.MAP) && MapReduceI.WORKER_END.contains(MapReduce.Stage.COMBINE) && MapReduceI.WORKER_END.contains(MapReduce.Stage.REDUCE));
         }
     }
@@ -1273,14 +1273,14 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
         @Override
         public void map(final Vertex vertex, final MapEmitter<NullObject, Integer> emitter) {
             emitter.emit(1);
-            assertEquals(1, WORKER_START.size());
+            assertEquals(1, countTrue(WORKER_START));
             assertTrue(WORKER_START.contains(Stage.MAP));
         }
 
         @Override
         public void combine(final NullObject key, final Iterator<Integer> values, final ReduceEmitter<NullObject, Integer> emitter) {
             emitter.emit(2);
-            assertEquals(2, WORKER_START.size());
+            assertEquals(2, countTrue(WORKER_START));
             assertTrue(WORKER_START.contains(Stage.MAP) && WORKER_START.contains(Stage.COMBINE));
             assertFalse(WORKER_END.isEmpty());
         }
@@ -1289,10 +1289,10 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
         public void reduce(final NullObject key, final Iterator<Integer> values, final ReduceEmitter<NullObject, Integer> emitter) {
             emitter.emit(3);
             if (WORKER_START.size() == 2) {
-                assertEquals(2, WORKER_START.size());
+                assertEquals(2, countTrue(WORKER_START));
                 assertTrue(WORKER_START.contains(Stage.MAP) && WORKER_START.contains(Stage.REDUCE));
             } else {
-                assertEquals(3, WORKER_START.size());
+                assertEquals(3, countTrue(WORKER_START));
                 assertTrue(WORKER_START.contains(Stage.MAP) && WORKER_START.contains(Stage.COMBINE) && WORKER_START.contains(Stage.REDUCE));
             }
             assertFalse(WORKER_END.isEmpty());
@@ -1316,6 +1316,15 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
         public String getMemoryKey() {
             return "a";
         }
+
+        /**
+         * Javadoc for {@code ConcurrentSkipListSet} includes this little note: "Beware that, unlike in most
+         * collections, the size method is not a constant-time operation." Doing a traversal of elements will yield
+         * the correct count. Java 11 upgrade seemed to force this failure consistently.
+         */
+        static int countTrue(final Set<Stage> s) {
+            return Long.valueOf(IteratorUtils.count(s)).intValue();
+        }
     }
 
     /////////////////////////////////////////////


[tinkerpop] 03/05: TINKERPOP-2076 Made expectations around mock more explicit

Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch TINKERPOP-2076
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 8e0a847377f27885de5181c853898817098dc820
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Wed Mar 6 14:56:17 2019 -0500

    TINKERPOP-2076 Made expectations around mock more explicit
    
    The upgrade of mockito must have tightened some requirements around stubbing and the use of nulls. Setting expected arguments seemed to get the test working as it was before.
---
 .../tinkerpop/gremlin/server/op/AbstractEvalOpProcessorTest.java   | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessorTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessorTest.java
index f708159..8e12700 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessorTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessorTest.java
@@ -19,6 +19,7 @@
 package org.apache.tinkerpop.gremlin.server.op;
 
 import io.netty.channel.ChannelHandlerContext;
+import org.apache.tinkerpop.gremlin.driver.Tokens;
 import org.apache.tinkerpop.gremlin.driver.message.RequestMessage;
 import org.apache.tinkerpop.gremlin.driver.message.ResponseMessage;
 import org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode;
@@ -41,11 +42,13 @@ import static org.mockito.Matchers.anyString;
 
 public class AbstractEvalOpProcessorTest {
 
-    @org.junit.Ignore
     @Test
     public void evalOpInternalShouldHandleAllEvaluationExceptions() throws OpProcessorException {
         final AbstractEvalOpProcessor processor = new StandardOpProcessor();
-        final RequestMessage request = RequestMessage.build("test").create();
+        final RequestMessage request = RequestMessage.build("test")
+                .addArg(Tokens.ARGS_GREMLIN, "1+1")
+                .addArg(Tokens.ARGS_LANGUAGE, "gremlin-groovy")
+                .create();
         final Settings settings = new Settings();
         final ChannelHandlerContext ctx = Mockito.mock(ChannelHandlerContext.class);
         final ArgumentCaptor<ResponseMessage> responseCaptor = ArgumentCaptor.forClass(ResponseMessage.class);