geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zho...@apache.org
Subject [47/51] [abbrv] geode git commit: GEODE-2558: Upgrade Powermock version to fix failing tests
Date Wed, 14 Jun 2017 22:07:34 GMT
GEODE-2558: Upgrade Powermock version to fix failing tests


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

Branch: refs/heads/feature/GEM-1483
Commit: b616e80d1f9583eead82917f95ba5d9da4eb4f05
Parents: 0d43e3d
Author: Jared Stewart <jstewart@pivotal.io>
Authored: Wed Jun 14 10:14:55 2017 -0700
Committer: Kirk Lund <klund@apache.org>
Committed: Wed Jun 14 11:06:33 2017 -0700

----------------------------------------------------------------------
 .../cache/tier/sockets/command/Put61Test.java   | 28 ++++++++---------
 .../cache/tier/sockets/command/Put65Test.java   | 26 ++++++++--------
 .../cache/tier/sockets/command/PutTest.java     | 32 +++++++++-----------
 .../internal/statistics/StatisticsImplTest.java |  6 ++--
 gradle/dependency-versions.properties           |  4 +--
 5 files changed, 46 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/b616e80d/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put61Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put61Test.java
b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put61Test.java
index fb3a9dd..bd99e6c 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put61Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put61Test.java
@@ -14,29 +14,22 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.assertj.core.api.Assertions.*;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isA;
-import static org.mockito.Mockito.*;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.mockito.ArgumentCaptor;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 
 import org.apache.geode.CancelCriterion;
 import org.apache.geode.cache.operations.PutOperationContext;
 import org.apache.geode.internal.Version;
-import org.apache.geode.internal.cache.EntryEventImpl;
 import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
-import org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID;
 import org.apache.geode.internal.cache.tier.sockets.Message;
 import org.apache.geode.internal.cache.tier.sockets.Part;
 import org.apache.geode.internal.cache.tier.sockets.ServerConnection;
@@ -44,6 +37,13 @@ import org.apache.geode.internal.security.AuthorizeRequest;
 import org.apache.geode.internal.security.SecurityService;
 import org.apache.geode.security.NotAuthorizedException;
 import org.apache.geode.test.junit.categories.UnitTest;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.mockito.ArgumentCaptor;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
 
 @Category(UnitTest.class)
 public class Put61Test {
@@ -107,7 +107,7 @@ public class Put61Test {
 
     when(this.deltaPart.getObject()).thenReturn(true);
 
-    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);
@@ -132,7 +132,7 @@ public class Put61Test {
     when(this.serverConnection.getClientVersion()).thenReturn(Version.CURRENT);
 
     when(this.localRegion.basicBridgePut(eq(KEY), eq(VALUE), eq(VALUE), eq(true), eq(CALLBACK_ARG),
-        any(ClientProxyMembershipID.class), eq(true), any(EntryEventImpl.class))).thenReturn(true);
+        any(), eq(true), any())).thenReturn(true);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/geode/blob/b616e80d/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put65Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put65Test.java
b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put65Test.java
index 81f17cb..8d52b88 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put65Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put65Test.java
@@ -14,30 +14,23 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.assertj.core.api.Assertions.*;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isA;
-import static org.mockito.Mockito.*;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.mockito.ArgumentCaptor;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 
 import org.apache.geode.CancelCriterion;
 import org.apache.geode.cache.operations.PutOperationContext;
 import org.apache.geode.internal.Version;
-import org.apache.geode.internal.cache.EntryEventImpl;
 import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.TXManagerImpl;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
-import org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID;
 import org.apache.geode.internal.cache.tier.sockets.Message;
 import org.apache.geode.internal.cache.tier.sockets.Part;
 import org.apache.geode.internal.cache.tier.sockets.ServerConnection;
@@ -45,6 +38,13 @@ import org.apache.geode.internal.security.AuthorizeRequest;
 import org.apache.geode.internal.security.SecurityService;
 import org.apache.geode.security.NotAuthorizedException;
 import org.apache.geode.test.junit.categories.UnitTest;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.mockito.ArgumentCaptor;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
 
 @Category(UnitTest.class)
 public class Put65Test {
@@ -122,7 +122,7 @@ public class Put65Test {
     when(this.keyPart.getStringOrObject()).thenReturn(KEY);
 
     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);
+        any(), eq(true), any())).thenReturn(true);
 
     when(this.message.getNumberOfParts()).thenReturn(8);
     when(this.message.getPart(eq(0))).thenReturn(this.regionNamePart);

http://git-wip-us.apache.org/repos/asf/geode/blob/b616e80d/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 2b22f13..6f894cf 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
@@ -14,30 +14,24 @@
  */
 package org.apache.geode.internal.cache.tier.sockets.command;
 
-import static org.assertj.core.api.Assertions.*;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.ArgumentMatchers.any;
 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;
-import org.mockito.ArgumentCaptor;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import static org.mockito.Mockito.anyBoolean;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.isNull;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 
 import org.apache.geode.CancelCriterion;
 import org.apache.geode.cache.operations.PutOperationContext;
 import org.apache.geode.internal.Version;
-import org.apache.geode.internal.cache.EntryEventImpl;
 import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
-import org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID;
 import org.apache.geode.internal.cache.tier.sockets.Message;
 import org.apache.geode.internal.cache.tier.sockets.Part;
 import org.apache.geode.internal.cache.tier.sockets.ServerConnection;
@@ -45,6 +39,13 @@ import org.apache.geode.internal.security.AuthorizeRequest;
 import org.apache.geode.internal.security.SecurityService;
 import org.apache.geode.security.NotAuthorizedException;
 import org.apache.geode.test.junit.categories.UnitTest;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.mockito.ArgumentCaptor;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
 
 @Category(UnitTest.class)
 public class PutTest {
@@ -129,10 +130,7 @@ public class PutTest {
     when(this.serverConnection.getClientVersion()).thenReturn(Version.CURRENT);
 
     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));
+        any(), anyBoolean(), any())).thenReturn(true);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/geode/blob/b616e80d/geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsImplTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsImplTest.java
b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsImplTest.java
index 2747252..8b2a9b4 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsImplTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsImplTest.java
@@ -128,14 +128,12 @@ public class StatisticsImplTest {
     assertEquals(1, stats.invokeSuppliers());
 
     // String message, Object p0, Object p1, Object p2
-    verify(logger, times(1)).warn(anyString(), isNull(), anyInt(),
-        isA(NullPointerException.class));
+    verify(logger, times(1)).warn(anyString(), isNull(), anyInt(), isA(NullPointerException.class));
 
     assertEquals(1, stats.invokeSuppliers());
 
     // Make sure the logger isn't invoked again
-    verify(logger, times(1)).warn(anyString(), isNull(), anyInt(),
-        isA(NullPointerException.class));
+    verify(logger, times(1)).warn(anyString(), isNull(), anyInt(), isA(NullPointerException.class));
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/geode/blob/b616e80d/gradle/dependency-versions.properties
----------------------------------------------------------------------
diff --git a/gradle/dependency-versions.properties b/gradle/dependency-versions.properties
index f304aac..183dafc 100644
--- a/gradle/dependency-versions.properties
+++ b/gradle/dependency-versions.properties
@@ -66,7 +66,7 @@ junit-quickcheck.version = 0.7
 JUnitParams.version = 1.0.6
 log4j.version = 2.7
 lucene.version = 6.4.1
-mockito-core.version = 2.7.11
+mockito-core.version = 2.8.9
 mockrunner.version = 1.1.2
 mortbay-jetty-servlet-api.version=3.0.20100224
 multithreadedtc.version = 1.01
@@ -76,7 +76,7 @@ mx4j-tools.version = 3.0.1
 netty-all.version = 4.1.8.Final
 open-json.version = 1.8
 phantomjsdriver.version=1.3.0
-powermock.version = 1.7.0RC2
+powermock.version = 1.7.0RC4
 selenium.version=3.0.1
 shiro.version=1.3.2
 slf4j-api.version = 1.7.23


Mime
View raw message