Refactor RaftActorTest to avoid test failures 03/108303/1
authorŠimon Ukuš <simon.ukus@pantheon.tech>
Thu, 15 Jun 2023 11:47:28 +0000 (13:47 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 10 Oct 2023 13:01:28 +0000 (15:01 +0200)
commit35753ddb090165267527be2f3573cd132d961435
tree2d8ddec714014df8ccfe9335b9414c418dce1604
parent536161e49a71eb3b38418f8fc1e3beb76285dee7
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>
(cherry picked from commit 1f3e1e45b2a4805fca97a375893c96103a48c175)
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/RaftActorTest.java