Move CountDown to After Target Method Call
Small adjustment to where the countdown latch is decremented to prevent test asserts from firing to soon.
This commit is contained in:
@@ -41,8 +41,8 @@ public class LatchCountDownAndCallRealMethodAnswer implements Answer<Void> {
|
||||
|
||||
@Override
|
||||
public Void answer(InvocationOnMock invocation) throws Throwable {
|
||||
this.latch.countDown();
|
||||
invocation.callRealMethod();
|
||||
this.latch.countDown();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user