Refactor RaftActorTest to avoid test failures 97/106497/8
authorŠimon Ukuš <simon.ukus@pantheon.tech>
Thu, 15 Jun 2023 11:47:28 +0000 (13:47 +0200)
committerRobert Varga <nite@hq.sk>
Tue, 10 Oct 2023 12:56:56 +0000 (12:56 +0000)
commit1f3e1e45b2a4805fca97a375893c96103a48c175
treee6dece969c2aff5957c2f8f96f1c847c393dc4d0
parent2528d0289abab04cac5cbdf973f1bb4cff6c4864
Refactor RaftActorTest to avoid test failures

The "doReturn(value).when(mockObj).coolMethod(same(arg))" way of mocking
the return values for "coolMethod()" calls resulted in
UnfinishedStubbingException, even though there seems to be no reason
for such error. This change introduces "the other" way of such mocking:
"when(mockObj.coolMethod(same(arg)).thenReturn()".

JIRA: CONTROLLER-2080
Change-Id: I58b9c08780c27b43ad5eff4e21c921b9260fc236
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/RaftActorTest.java