Mikhail Efremov created IGNITE-27784:
----------------------------------------
Summary: ItRaftGroupServiceTest#testChangePeersAndLearnersAsync is
flaky with UnfinishedStubbingException
Key: IGNITE-27784
URL: https://issues.apache.org/jira/browse/IGNITE-27784
Project: Ignite
Issue Type: Bug
Reporter: Mikhail Efremov
**Subject test**
{{ItRaftGroupServiceTest#testChangePeersAndLearnersAsync}}
**Reason to fail**
{{UnfinishedStubbingException}}
**Full stacktrace log**
{code:java}
org.mockito.exceptions.misusing.UnfinishedStubbingException:
Unfinished stubbing detected here:
-> at
org.apache.ignite.internal.raft.ItRaftGroupServiceTest.testChangePeersAndLearnersAsync(ItRaftGroupServiceTest.java:191)
E.g. thenReturn() may be missing.
Examples of correct stubbing:
when(mock.isOk()).thenReturn(true);
when(mock.isOk()).thenThrow(exception);
doThrow(exception).when(mock).someVoidMethod();
Hints:
1. missing thenReturn()
2. you are trying to stub a final method, which is not supported
3. you are stubbing the behaviour of another mock inside before 'thenReturn'
instruction is completed, possibly on another thread
org.mockito.exceptions.misusing.UnfinishedStubbingException:
Unfinished stubbing detected here:
-> at
org.apache.ignite.internal.raft.ItRaftGroupServiceTest.testChangePeersAndLearnersAsync(ItRaftGroupServiceTest.java:191)
E.g. thenReturn() may be missing.
Examples of correct stubbing:
when(mock.isOk()).thenReturn(true);
when(mock.isOk()).thenThrow(exception);
doThrow(exception).when(mock).someVoidMethod();
Hints:
1. missing thenReturn()
2. you are trying to stub a final method, which is not supported
3. you are stubbing the behaviour of another mock inside before 'thenReturn'
instruction is completed, possibly on another thread
at
app//org.apache.ignite.internal.raft.RaftGroupEventsListener.onNewPeersConfigurationApplied(RaftGroupEventsListener.java:49)
at
app//org.apache.ignite.internal.raft.ItRaftGroupServiceTest.testChangePeersAndLearnersAsync(ItRaftGroupServiceTest.java:195)
at [email protected]/java.lang.reflect.Method.invoke(Method.java:566)
at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1541)
at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1541)
{code}
**Failed TC build**
https://ci.ignite.apache.org/buildConfiguration/ApacheIgnite3x_Test_RunAllTests/10017822
--
This message was sent by Atlassian Jira
(v8.20.10#820010)