geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zho...@apache.org
Subject [46/51] [abbrv] geode git commit: GEODE-2629: fix ConnectionJUnitTest use of Mockito 2.7.11
Date Wed, 14 Jun 2017 22:07:33 GMT
GEODE-2629: fix ConnectionJUnitTest use of Mockito 2.7.11


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/0d43e3d8
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/0d43e3d8
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/0d43e3d8

Branch: refs/heads/feature/GEM-1483
Commit: 0d43e3d86acbe0ee136046be8ef00f90ff0c0242
Parents: e3a1ae0
Author: Kirk Lund <klund@apache.org>
Authored: Tue Jun 13 11:05:54 2017 -0700
Committer: Kirk Lund <klund@apache.org>
Committed: Wed Jun 14 11:06:33 2017 -0700

----------------------------------------------------------------------
 .../internal/cache/tier/sockets/command/PutTest.java      | 10 +++++++---
 .../apache/geode/internal/tcp/ConnectionJUnitTest.java    |  2 +-
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/0d43e3d8/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/PutTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/PutTest.java
b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/PutTest.java
index 2578e00..2b22f13 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/PutTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/PutTest.java
@@ -20,6 +20,7 @@ import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.*;
 
+import org.apache.geode.internal.cache.EventIDHolder;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -104,7 +105,7 @@ public class PutTest {
 
     when(this.callbackArgsPart.getObject()).thenReturn(CALLBACK_ARG);
 
-    when(this.eventPart.getSerializedForm()).thenReturn(this.EVENT);
+    when(this.eventPart.getSerializedForm()).thenReturn(EVENT);
 
     when(this.valuePart.getSerializedForm()).thenReturn(VALUE);
     when(this.valuePart.isObject()).thenReturn(true);
@@ -127,8 +128,11 @@ public class PutTest {
     when(this.serverConnection.getErrorResponseMessage()).thenReturn(this.errorResponseMessage);
     when(this.serverConnection.getClientVersion()).thenReturn(Version.CURRENT);
 
-    when(this.localRegion.basicBridgePut(eq(KEY), eq(VALUE), eq(null), eq(true), eq(CALLBACK_ARG),
-        any(ClientProxyMembershipID.class), eq(true), any(EntryEventImpl.class))).thenReturn(true);
+    when(this.localRegion.basicBridgePut(eq(KEY), eq(VALUE), isNull(), eq(true), eq(CALLBACK_ARG),
+        isA(ClientProxyMembershipID.class), eq(true), isA(EntryEventImpl.class))).thenReturn(true);
+
+    // here's the actual call made by tests of basicBridgePut...
+    // region.basicBridgePut(key, value, null, isObject, callbackArg, serverConnection.getProxyID(),
true, new EventIDHolder(eventId));
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/geode/blob/0d43e3d8/geode-core/src/test/java/org/apache/geode/internal/tcp/ConnectionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/tcp/ConnectionJUnitTest.java
b/geode-core/src/test/java/org/apache/geode/internal/tcp/ConnectionJUnitTest.java
index 193240d..aeeb60f 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/tcp/ConnectionJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/tcp/ConnectionJUnitTest.java
@@ -80,6 +80,6 @@ public class ConnectionJUnitTest {
     Connection conn = new Connection(table, socket);
     conn.setSharedUnorderedForTest();
     conn.run();
-    verify(membership).suspectMember(any(InternalDistributedMember.class), any(String.class));
+    verify(membership).suspectMember(isNull(InternalDistributedMember.class), any(String.class));
   }
 }


Mime
View raw message