You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ra...@apache.org on 2021/02/17 10:50:44 UTC
[phoenix-omid] branch master updated: OMID-197 Replace Mockito
timeout#never() with times(0)
This is an automated email from the ASF dual-hosted git repository.
rajeshbabu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix-omid.git
The following commit(s) were added to refs/heads/master by this push:
new 392056f OMID-197 Replace Mockito timeout#never() with times(0)
392056f is described below
commit 392056f4062dc5669b5d6c6efa0be1da980277fc
Author: Rajeshbabu Chintaguntla <ra...@apache.org>
AuthorDate: Wed Feb 17 16:20:20 2021 +0530
OMID-197 Replace Mockito timeout#never() with times(0)
---
pom.xml | 2 +-
.../src/test/java/org/apache/omid/tso/TestReplyProcessor.java | 2 +-
.../src/test/java/org/apache/omid/tso/TestRequestProcessor.java | 2 +-
.../test/java/org/apache/omid/tso/TestTSOChannelHandlerNetty.java | 6 +++---
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/pom.xml b/pom.xml
index adcedb3..fea3247 100644
--- a/pom.xml
+++ b/pom.xml
@@ -180,7 +180,7 @@
<protobuf.plugin.version>0.6.1</protobuf.plugin.version>
<os.plugin.version>1.6.2</os.plugin.version>
<junit.version>4.13</junit.version>
- <mockito.version>1.9.5</mockito.version>
+ <mockito.version>1.10.19</mockito.version>
<disruptor.version>3.2.0</disruptor.version>
<metrics.version>3.0.1</metrics.version>
<jcommander.version>1.35</jcommander.version>
diff --git a/tso-server/src/test/java/org/apache/omid/tso/TestReplyProcessor.java b/tso-server/src/test/java/org/apache/omid/tso/TestReplyProcessor.java
index 5936b2d..977f630 100644
--- a/tso-server/src/test/java/org/apache/omid/tso/TestReplyProcessor.java
+++ b/tso-server/src/test/java/org/apache/omid/tso/TestReplyProcessor.java
@@ -280,7 +280,7 @@ public class TestReplyProcessor {
inOrderWatermarkWriter.verify(lowWatermarkWriter, times(1)).persistLowWatermark(eq(100L));
inOrderWatermarkWriter.verify(lowWatermarkWriter, times(1)).persistLowWatermark(eq(150L));
- verify(lowWatermarkWriter, timeout(100).never()).persistLowWatermark(eq(50L));
+ verify(lowWatermarkWriter, timeout(100).times(0)).persistLowWatermark(eq(50L));
InOrder inOrderCheckLWM = inOrder(replyProcessor, replyProcessor,replyProcessor,replyProcessor,replyProcessor);
inOrderCheckLWM.verify(replyProcessor, times(1)).updateLowWatermark(Optional.of(100L));
diff --git a/tso-server/src/test/java/org/apache/omid/tso/TestRequestProcessor.java b/tso-server/src/test/java/org/apache/omid/tso/TestRequestProcessor.java
index a385be7..8f7a5a8 100644
--- a/tso-server/src/test/java/org/apache/omid/tso/TestRequestProcessor.java
+++ b/tso-server/src/test/java/org/apache/omid/tso/TestRequestProcessor.java
@@ -203,7 +203,7 @@ public class TestRequestProcessor {
// Then, check it is called when cache is full and the first element is evicted (should be a AbstractTransactionManager.NUM_OF_CHECKPOINTS)
verify(persist, timeout(100).times(1)).addCommitToBatch(eq(ANY_START_TS), anyLong(), any(Channel.class), any(MonitoringContextImpl.class), eq(Optional.of(FIRST_COMMIT_TS_EVICTED)));
// Finally it should never be called with the next element
- verify(persist, timeout(100).never()).addCommitToBatch(eq(ANY_START_TS), anyLong(), any(Channel.class), any(MonitoringContextImpl.class), eq(Optional.of(NEXT_COMMIT_TS_THAT_SHOULD_BE_EVICTED)));
+ verify(persist, timeout(100).times(0)).addCommitToBatch(eq(ANY_START_TS), anyLong(), any(Channel.class), any(MonitoringContextImpl.class), eq(Optional.of(NEXT_COMMIT_TS_THAT_SHOULD_BE_EVICTED)));
}
diff --git a/tso-server/src/test/java/org/apache/omid/tso/TestTSOChannelHandlerNetty.java b/tso-server/src/test/java/org/apache/omid/tso/TestTSOChannelHandlerNetty.java
index a155dec..9a0a15a 100644
--- a/tso-server/src/test/java/org/apache/omid/tso/TestTSOChannelHandlerNetty.java
+++ b/tso-server/src/test/java/org/apache/omid/tso/TestTSOChannelHandlerNetty.java
@@ -261,7 +261,7 @@ public class TestTSOChannelHandlerNetty {
// Write into the channel
channel.write(tsBuilder.build()).await();
verify(requestProcessor, timeout(100).times(1)).timestampRequest(any(Channel.class), any(MonitoringContextImpl.class));
- verify(requestProcessor, timeout(100).never())
+ verify(requestProcessor, timeout(100).times(0))
.commitRequest(anyLong(), anyCollectionOf(Long.class), anyCollectionOf(Long.class), anyBoolean(), any(Channel.class), any(MonitoringContextImpl.class));
}
@@ -277,7 +277,7 @@ public class TestTSOChannelHandlerNetty {
assertTrue(r.hasCommitRequest());
// Write into the channel
channel.write(commitBuilder.build()).await();
- verify(requestProcessor, timeout(100).never()).timestampRequest(any(Channel.class), any(MonitoringContextImpl.class));
+ verify(requestProcessor, timeout(100).times(0)).timestampRequest(any(Channel.class), any(MonitoringContextImpl.class));
verify(requestProcessor, timeout(100).times(1))
.commitRequest(eq(666L), anyCollectionOf(Long.class), anyCollectionOf(Long.class), eq(false), any(Channel.class), any(MonitoringContextImpl.class));
}
@@ -293,7 +293,7 @@ public class TestTSOChannelHandlerNetty {
assertTrue(r.hasFenceRequest());
// Write into the channel
channel.write(fenceBuilder.build()).await();
- verify(requestProcessor, timeout(100).never()).timestampRequest(any(Channel.class), any(MonitoringContextImpl.class));
+ verify(requestProcessor, timeout(100).times(0)).timestampRequest(any(Channel.class), any(MonitoringContextImpl.class));
verify(requestProcessor, timeout(100).times(1))
.fenceRequest(eq(666L), any(Channel.class), any(MonitoringContextImpl.class));
}