-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Make unit tests to only use dynamically allocated ports #5486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
run java8 tests |
jiazhai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great to have this feature.
|
run java8 tests |
codelipenghui
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
run java8 tests |
|
run java8 tests. |
|
run java8 tests |
|
run java8 tests |
1 similar comment
|
run java8 tests |
|
run java8 tests |
2 similar comments
|
run java8 tests |
|
run java8 tests |
|
Unit testing seems to have some problems: |
*Motivation* A regression was introduced in apache#5486. If websocket service as running as part of pulsar standalone, the cluster data is set with null service urls. This causes service url is not set correctly in the pulsar client and an illegal argument exception ("Param serviceUrl must not be blank.") will be thrown. *Modifications* 1. Pass `null` when constructing the websocket service. So the local cluster data can be refreshed when creating pulsar client. 2. Set the cluster data after both broker service and web service started and ports are allocated. *Test* Verified locally and need to figure out how to automate this in integration tests
*Motivation* Fixes #5997 Fixes #6079 A regression was introduced in #5486. If websocket service as running as part of pulsar standalone, the cluster data is set with null service urls. This causes service url is not set correctly in the pulsar client and an illegal argument exception ("Param serviceUrl must not be blank.") will be thrown. *Modifications* 1. Pass `null` when constructing the websocket service. So the local cluster data can be refreshed when creating pulsar client. 2. Set the cluster data after both broker service and web service started and ports are allocated.
) *Motivation* Fixes apache#5997 Fixes apache#6079 A regression was introduced in apache#5486. If websocket service as running as part of pulsar standalone, the cluster data is set with null service urls. This causes service url is not set correctly in the pulsar client and an illegal argument exception ("Param serviceUrl must not be blank.") will be thrown. *Modifications* 1. Pass `null` when constructing the websocket service. So the local cluster data can be refreshed when creating pulsar client. 2. Set the cluster data after both broker service and web service started and ports are allocated.
) *Motivation* Fixes apache#5997 Fixes apache#6079 A regression was introduced in apache#5486. If websocket service as running as part of pulsar standalone, the cluster data is set with null service urls. This causes service url is not set correctly in the pulsar client and an illegal argument exception ("Param serviceUrl must not be blank.") will be thrown. *Modifications* 1. Pass `null` when constructing the websocket service. So the local cluster data can be refreshed when creating pulsar client. 2. Set the cluster data after both broker service and web service started and ports are allocated. (cherry picked from commit 49a9897)
The two failures for this have been fixed by: - 8df1f9c Do not use timed receive in BrokerClientIntegrationTest.testUnsupportedBatchMessageConsumer (apache#5333) - f141efa Make unit tests to only use dynamically allocated ports (apache#5486)
*Motivation* Fixes #5997 Fixes #6079 A regression was introduced in #5486. If websocket service as running as part of pulsar standalone, the cluster data is set with null service urls. This causes service url is not set correctly in the pulsar client and an illegal argument exception ("Param serviceUrl must not be blank.") will be thrown. *Modifications* 1. Pass `null` when constructing the websocket service. So the local cluster data can be refreshed when creating pulsar client. 2. Set the cluster data after both broker service and web service started and ports are allocated. (cherry picked from commit 49a9897)
) *Motivation* Fixes apache#5997 Fixes apache#6079 A regression was introduced in apache#5486. If websocket service as running as part of pulsar standalone, the cluster data is set with null service urls. This causes service url is not set correctly in the pulsar client and an illegal argument exception ("Param serviceUrl must not be blank.") will be thrown. *Modifications* 1. Pass `null` when constructing the websocket service. So the local cluster data can be refreshed when creating pulsar client. 2. Set the cluster data after both broker service and web service started and ports are allocated. (cherry picked from commit 49a9897)
* Make unit tests to only use dynamically allocated ports * Fixed proxy tests * Fixed zk test utils after merge * Fixed multi host client test * Fix for testConcurrentConsumerReceiveWhileReconnect * Increased timeout on testPulsarSourceLocalRunWithFile * Fixed newer test to also avoid port manager * Fixed test race condition with thread starting in PulsarFunctionLocalRunTest * Fixed ProxyWithAuthorizationNegTest * Fixed ProxySaslAuthenticationTest
) *Motivation* Fixes apache#5997 Fixes apache#6079 A regression was introduced in apache#5486. If websocket service as running as part of pulsar standalone, the cluster data is set with null service urls. This causes service url is not set correctly in the pulsar client and an illegal argument exception ("Param serviceUrl must not be blank.") will be thrown. *Modifications* 1. Pass `null` when constructing the websocket service. So the local cluster data can be refreshed when creating pulsar client. 2. Set the cluster data after both broker service and web service started and ports are allocated.
Motivation
Use dynamically allocated ports in unit tests execution to ensure no port conflicts between multiple threads/processes.