[Umbrella] Fix UTs to use random port instead of constant port to avoid port in used
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Search before asking
- [X] I have searched in the issues and found no similar issues.
Describe the proposal
Run UTs may encounter port already bind exception if your test node run another uniffle or process with same port.
We can use random port instead of constant port.
Task list
- [x] #2065
- [x] #2068
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Hi @maobaolong
Thanks for pointing out these issues and submitting a PR to correct them. Should we close this ticket if all issues had fixed?
In fact there are still some issue about this, but I have no bandwidth on this, you can feel free to close or left it.
what will happen when random port already used and then throw exception ?
So, I think can add check: if there is port already used, then use other port , what do you think ?
For grpc and netty port, server will retry to bind free port when it set to zero. For jetty port, server will bind a free port directly