CalvinKirs opened a new pull request #3044: URL: https://github.com/apache/incubator-dolphinscheduler/pull/3044
## *Tips* - *Thanks very much for contributing to Apache DolphinScheduler.* - *Please review https://dolphinscheduler.apache.org/en-us/community/index.html before opening a pull request.* ## What is the purpose of the pull request When I ut, he will accidentally get the following error in the concurrent situation(The specific error message can be found on this link:https://github.com/apache/incubator-dolphinscheduler/pull/3027/checks?check_run_id=799051935) queryUserQueueByProcessInstanceId() should return String *** If you're unsure why you're getting above error read on. Due to the nature of the syntax above problem might occur because: 1. This exception *might* occur in wrongly written multi-threaded tests. Please refer to Mockito FAQ on limitations of concurrency testing. 2. A spy is stubbed using when(spy.foo()).then() syntax. It is safer to stub spies - - with doReturn|Throw() family of methods. More in javadocs for Mockito.spy() method. I fixed it to avoid affecting subsequent pr submissions Related documents can be seen:https://groups.google.com/forum/?fromgroups#!topic/mockito/9WUvkhZUy90 ## Verify this pull request This pull request is already covered by existing tests, such as *(please describe tests)*. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
