slfan1989 commented on PR #1227:
URL: https://github.com/apache/ratis/pull/1227#issuecomment-2692749111
I have carefully reviewed the CI report, and these errors are likely
unrelated to the JUnit 5 upgrade. The same errors existed in JUnit 4 as well
and can still be reproduced locally.
Let me summarize the current situation regarding the unit test errors.
>
org.apache.ratis.grpc.TestWatchRequestWithGrpc#testWatchRequestAsyncChangeLeader
CI:
```
Error: Tests run: 5, Failures: 0, Errors: 1, Skipped: 4, Time elapsed:
163.401 s <<< FAILURE! - in org.apache.ratis.grpc.TestWatchRequestWithGrpc
Error:
org.apache.ratis.grpc.TestWatchRequestWithGrpc.testWatchRequestAsyncChangeLeader
Time elapsed: 163.266 s <<< ERROR!
java.util.concurrent.TimeoutException: testWatchRequestAsyncChangeLeader()
timed out after 100 seconds
```
LOCAL JUNIT4 SUCCESS
LOCAL JUNIT5 SUCCESS
> TestInstallSnapshotNotificationWithGrpc#testAddNewFollowersNoSnapshot
CI:
```
[INFO] Running org.apache.ratis.grpc.TestInstallSnapshotNotificationWithGrpc
Error: Tests run: 6, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
50.061 s <<< FAILURE! - in
org.apache.ratis.grpc.TestInstallSnapshotNotificationWithGrpc
Error:
org.apache.ratis.grpc.TestInstallSnapshotNotificationWithGrpc.testAddNewFollowersNoSnapshot
Time elapsed: 5.588 s <<< FAILURE!
org.opentest4j.AssertionFailedError: expected: <-1> but was: <16>
at
org.apache.ratis.InstallSnapshotNotificationTests.testAddNewFollowers(InstallSnapshotNotificationTests.java:256)
at
org.apache.ratis.InstallSnapshotNotificationTests.lambda$testAddNewFollowersNoSnapshot$1(InstallSnapshotNotificationTests.java:182)
at
org.apache.ratis.server.impl.MiniRaftCluster$Factory$Get.runWithNewCluster(MiniRaftCluster.java:144)
at
org.apache.ratis.server.impl.MiniRaftCluster$Factory$Get.runWithNewCluster(MiniRaftCluster.java:121)
at
org.apache.ratis.InstallSnapshotNotificationTests.testAddNewFollowersNoSnapshot(InstallSnapshotNotificationTests.java:182)
at java.lang.reflect.Method.invoke(Method.java:498)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at java.util.ArrayList.forEach(ArrayList.java:1259)
```
Local:
```
2025-03-02 21:50:06,575 [Time-limited test] INFO impl.MiniRaftCluster
(MiniRaftCluster.java:shutdown(883)) - MiniRaftClusterWithGrpc shutdown
completed
2025-03-02 21:50:06,576 [Time-limited test] INFO ratis.RaftTestUtil
(RaftTestUtil.java:gc(596)) - gc 0
2025-03-02 21:50:06,705 [Time-limited test] INFO impl.MiniRaftCluster
(MiniRaftClusterWithGrpc.java:lambda$null$2(103)) - Checking
s0-group-96D8828789EC
2025-03-02 21:50:06,706 [Time-limited test] INFO impl.MiniRaftCluster
(MiniRaftClusterWithGrpc.java:lambda$null$2(103)) - Checking
s1-group-96D8828789EC
2025-03-02 21:50:06,706 [Time-limited test] INFO impl.MiniRaftCluster
(MiniRaftClusterWithGrpc.java:lambda$null$2(103)) - Checking
s2-group-96D8828789EC
java.lang.AssertionError:
Expected :-1
Actual :16
<Click to see difference>
at org.junit.Assert.fail(Assert.java:89)
at org.junit.Assert.failNotEquals(Assert.java:835)
at org.junit.Assert.assertEquals(Assert.java:647)
at org.junit.Assert.assertEquals(Assert.java:633)
at
org.apache.ratis.InstallSnapshotNotificationTests.testAddNewFollowers(InstallSnapshotNotificationTests.java:256)
at
org.apache.ratis.InstallSnapshotNotificationTests.lambda$testAddNewFollowersNoSnapshot$1(InstallSnapshotNotificationTests.java:182)
at
org.apache.ratis.server.impl.MiniRaftCluster$Factory$Get.runWithNewCluster(MiniRaftCluster.java:144)
at
org.apache.ratis.server.impl.MiniRaftCluster$Factory$Get.runWithNewCluster(MiniRaftCluster.java:121)
at
org.apache.ratis.InstallSnapshotNotificationTests.testAddNewFollowersNoSnapshot(InstallSnapshotNotificationTests.java:182)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at
org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
at
org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.lang.Thread.run(Thread.java:840)
```
> TestRaftAsyncWithNetty
CI:
```
[INFO] Running org.apache.ratis.netty.TestRaftAsyncWithNetty
Error: Tests run: 14, Failures: 1, Errors: 7, Skipped: 0, Time elapsed:
348.303 s <<< FAILURE! - in Error:
# 1 TestRaftAsyncWithNetty#testStaleReadAsync
Error: org.apache.ratis.netty.TestRaftAsyncWithNetty.testStaleReadAsync
Time elapsed: 6.909 s <<< ERROR!
java.util.concurrent.CompletionException:
org.apache.ratis.protocol.exceptions.NotLeaderException: Server
s0@group-CC3D2906FD90 is not the leader, suggested leader is: s1|localhost:15004
at
org.apache.ratis.client.impl.RaftClientImpl.handleRaftException(RaftClientImpl.java:373)
at
org.apache.ratis.client.impl.OrderedAsync.lambda$send$3(OrderedAsync.java:175)
at
java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:616)
# 2 TestRaftAsyncWithNetty.#estStateMachineMetrics
Error:
org.apache.ratis.netty.TestRaftAsyncWithNetty.testStateMachineMetrics Time
elapsed: 1.417 s <<< ERROR!
java.util.concurrent.ExecutionException:
org.apache.ratis.protocol.exceptions.NotLeaderException: Server
s0@group-DA17DD87FDE1 is not the leader, suggested leader is: s1|localhost:15016
at
java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at
java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
# 3 TestRaftAsyncWithNetty.testAppendEntriesTimeout
Error:
org.apache.ratis.netty.TestRaftAsyncWithNetty.testAppendEntriesTimeout Time
elapsed: 6.356 s <<< FAILURE!
org.opentest4j.AssertionFailedError: expected: <false> but was: <true>
at
org.apache.ratis.RaftAsyncTests.runTestAppendEntriesTimeout(RaftAsyncTests.java:433)
at
org.apache.ratis.server.impl.MiniRaftCluster$Factory$Get.runWithNewCluster(MiniRaftCluster.java:144)
at
org.apache.ratis.server.impl.MiniRaftCluster$Factory$Get.runWithNewCluster(MiniRaftCluster.java:121)
at
org.apache.ratis.RaftAsyncTests.testAppendEntriesTimeout(RaftAsyncTests.java:413)
at java.lang.reflect.Method.invoke(Method.java:498)
# 4 TestRaftAsyncWithNetty.testWithLoadAsync
Error: org.apache.ratis.netty.TestRaftAsyncWithNetty.testWithLoadAsync
Time elapsed: 100.973 s <<< ERROR!
java.util.concurrent.TimeoutException: testWithLoadAsync() timed out after
100 seconds
at java.util.ArrayList.forEach(ArrayList.java:1259)
at java.util.ArrayList.forEach(ArrayList.java:1259)
Suppressed: java.lang.InterruptedException: sleep interrupted
# 5 TestRaftAsyncWithNetty.testRequestTimeout
Error: org.apache.ratis.netty.TestRaftAsyncWithNetty.testRequestTimeout
Time elapsed: 1.395 s <<< ERROR!
java.util.concurrent.ExecutionException:
org.apache.ratis.protocol.exceptions.NotLeaderException: Server
s0@group-2B35970A0B90 is not the leader, suggested leader is: s1|localhost:15088
at
java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at
java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
at
org.apache.ratis.RaftBasicTests.testRequestTimeout(RaftBasicTests.java:438)
# 6 TestRaftAsyncWithNetty#testAsyncRequestSemaphore
Error:
org.apache.ratis.netty.TestRaftAsyncWithNetty.testAsyncRequestSemaphore Time
elapsed: 100.379 s <<< ERROR!
java.util.concurrent.TimeoutException: testAsyncRequestSemaphore() timed out
after 100 seconds
at java.util.ArrayList.forEach(ArrayList.java:1259)
at java.util.ArrayList.forEach(ArrayList.java:1259)
# 7 TestRaftAsyncWithNetty#testNoRetryWaitOnNotLeaderException
Error:
org.apache.ratis.netty.TestRaftAsyncWithNetty.testNoRetryWaitOnNotLeaderException
Time elapsed: 1.636 s <<< ERROR!
java.util.concurrent.ExecutionException:
org.apache.ratis.protocol.exceptions.NotLeaderException: Server
s1@group-8CF8D02C8046 is not the leader, suggested leader is: s0|localhost:15120
at
java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at
java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1928)
at org.apache.ratis.util.TimeDuration.apply(TimeDuration.java:313)
# 8
TestRaftAsyncWithNetty#testRequestAsyncWithRetryFailureAfterInitialMessages
Error:
org.apache.ratis.netty.TestRaftAsyncWithNetty.testRequestAsyncWithRetryFailureAfterInitialMessages
Time elapsed: 100.97 s <<< ERROR!
java.util.concurrent.TimeoutException:
testRequestAsyncWithRetryFailureAfterInitialMessages() timed out after 100
seconds
at java.util.ArrayList.forEach(ArrayList.java:1259)
```
LOCAL:

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]