You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ratis.apache.org by sh...@apache.org on 2020/05/03 05:18:15 UTC
[incubator-ratis] branch master updated: RATIS-914. Fix Failed UT:
can not mock final class (#77)
This is an automated email from the ASF dual-hosted git repository.
shashikant pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ratis.git
The following commit(s) were added to refs/heads/master by this push:
new 8eacbd4 RATIS-914. Fix Failed UT: can not mock final class (#77)
8eacbd4 is described below
commit 8eacbd45cc6d8b68f6f4ef63195cc0118c1878a6
Author: runzhiwang <51...@users.noreply.github.com>
AuthorDate: Sun May 3 13:18:09 2020 +0800
RATIS-914. Fix Failed UT: can not mock final class (#77)
---
.../java/org/apache/ratis/server/raftlog/segmented/LogSegment.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ratis-server/src/main/java/org/apache/ratis/server/raftlog/segmented/LogSegment.java b/ratis-server/src/main/java/org/apache/ratis/server/raftlog/segmented/LogSegment.java
index 034e528..af5d32c 100644
--- a/ratis-server/src/main/java/org/apache/ratis/server/raftlog/segmented/LogSegment.java
+++ b/ratis-server/src/main/java/org/apache/ratis/server/raftlog/segmented/LogSegment.java
@@ -50,7 +50,8 @@ import java.util.function.Consumer;
*
* This class will be protected by the {@link SegmentedRaftLog}'s read-write lock.
*/
-public final class LogSegment implements Comparable<Long> {
+@SuppressWarnings("checkstyle:FinalClass")
+public class LogSegment implements Comparable<Long> {
//TODO: This class needs to be made final to address checkstyle issue. However, TestCacheEviction fails as Mockito
// cannot spy final class. This problem can be fixed when stable version of Mockito 2.x is available which provides