tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [tinkerpop] 04/06: TINKERPOP-2076 Made expectations around mock more explicit
Date Thu, 03 Oct 2019 16:41:41 GMT
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 fd85f600a8ff9fa90146387ac727d5d882ed7ed7
Author: Stephen Mallette <spmva@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 88d12ea..657cfb2 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);


Mime
View raw message