TeslaCN opened a new issue #1737:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1737
## Bug Report
**The probability is very small.**
### Actual behavior
```
Running
org.apache.shardingsphere.elasticjob.cloud.console.controller.CloudJobControllerTest
Tests run: 27, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.621 sec
<<< FAILURE! - in
org.apache.shardingsphere.elasticjob.cloud.console.controller.CloudJobControllerTest
assertRegisterWithExistedName(org.apache.shardingsphere.elasticjob.cloud.console.controller.CloudJobControllerTest)
Time elapsed: 0.015 sec <<< ERROR!
org.mockito.exceptions.misusing.WrongTypeOfReturnValue:
String cannot be returned by getNumChildren()
getNumChildren() should return int
***
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.
at
org.apache.shardingsphere.elasticjob.cloud.console.controller.CloudJobControllerTest.assertRegisterWithExistedName(CloudJobControllerTest.java:92)
```
### Steps to reproduce the behavior.
Just run `mvn install`
----------------------------------------------------------------
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]