-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[improve][test] Improve SimpleProducerConsumerTest to reduce the execution time #17887
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
[improve][test] Improve SimpleProducerConsumerTest to reduce the execution time #17887
Conversation
poorbarcode
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.
pulsar/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
Line 2814 in afd2949
| this.conf.setMaxMessageSize(1000); |
I think this conf should be reset after method
|
|
||
| for (String tenant : admin.tenants().getTenants()) { | ||
| for (String namespace : admin.namespaces().getNamespaces(tenant)) { | ||
| admin.namespaces().deleteNamespace(namespace, true); |
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.
Suggest to use deleteNamespaceGraceFully, because delete namespace is not a stable cmd, see #17157.
Note that deleteNamespaceGraceFully runs slower than delete namespace and is unsuitable for all scenarios.
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.
Ok, thanks.
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.
Suggest to use
deleteNamespaceGraceFully, becausedelete namespaceis not a stable cmd, see #17157.Note that
deleteNamespaceGraceFullyruns slower thandelete namespaceand is unsuitable for all scenarios.
in my CI test, There are two failures related to these changes:
Time elapsed failures while excute deleteNamespaceGraceFully
see the checks in https://github.com/apache/pulsar/actions/runs/3242148385/jobs/5326408439
could i skip this test temporary?
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.
@poorbarcode hi
my CI check always fails in Pulsar CI Flaky / Flaky tests suite . seem releted to run deleteNamespaceGraceFully
cloud you please help me confirm the reason? thx
https://github.com/apache/pulsar/actions/runs/3242148385/jobs/5359655987
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.
@ethqunzhong I see, could you rebase master and see if it reproduces?
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.
Hi @ethqunzhong If you said PR #17803, then the error does not affect the merge
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.
@poorbarcode thx your reply.
afd2949 to
6a550af
Compare
|
@codelipenghui PTAL. |
|
@coderzc @codelipenghui there were failures in the CI for this pull in the flaky test suite. See the checks https://github.com/apache/pulsar/actions/runs/3219150517 There are two failures related to these changes:
Could you please address them? |
Fixed
Modifications
Only execution once
setup/cleanand cleantenants/namespaces/producer/consumerafter the end of each test execution.Execution time after improve test:
Documentation
doc-required(Your PR needs to update docs and you will update later)
doc-not-needed(Please explain why)
doc(Your PR contains doc changes)
doc-complete(Docs have been already added)
Matching PR in forked repository
PR in forked repository: coderzc#7