Will-Lo commented on code in PR #4002:
URL: https://github.com/apache/gobblin/pull/4002#discussion_r1678495530
##########
gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/proc/LaunchDagProcTest.java:
##########
@@ -135,6 +138,10 @@ public void launchDagWithMultipleParallelJobs() throws
IOException, InterruptedE
flowCompilationValidationHelper);
launchDagProc.process(this.dagManagementStateStore);
+
+ // Verify adhoc flow spec will be removed from catalog
+
Mockito.verify(this.dagManagementStateStore,Mockito.times(2)).removeFlowSpec(any());
Review Comment:
I think this is potentially flaky if you are validating a mock on a shared
object between tests for testng (note Junit should be resetting the mock state
in between tests)
https://stackoverflow.com/questions/37591644/using-mockito-with-testng
To get a consistent behavior you may need to use junit or add this function:
```
@BeforeMethod
public void init() {
MockitoAnnotations.initMocks(this);
}
```
--
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]