incubator-uniffle icon indicating copy to clipboard operation
incubator-uniffle copied to clipboard

[Umbrella] Fix UTs to use random port instead of constant port to avoid port in used

Open maobaolong opened this issue 1 year ago • 4 comments

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!

maobaolong avatar Aug 19 '24 10:08 maobaolong

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?

cchung100m avatar Jan 03 '25 06:01 cchung100m

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.

maobaolong avatar Jan 03 '25 07:01 maobaolong

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 ?

lifeSo avatar Mar 10 '25 17:03 lifeSo

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

summaryzb avatar Mar 13 '25 12:03 summaryzb