Skip to content

[improve][test] Improve NamespacesTest to reduce the execution time - #17875

Merged
codelipenghui merged 4 commits into
apache:masterfrom
poorbarcode:make_faster/NamespacesTest
Nov 2, 2022
Merged

codelipenghui merged 4 commits into
apache:masterfrom
poorbarcode:make_faster/NamespacesTest

Conversation

@poorbarcode

@poorbarcode poorbarcode commented Sep 28, 2022 •

Copy link
Copy Markdown
Contributor

Fixes: #17622

Motivation & Modifications

  • Manually release resources, including consumer, producer, pulsar client, transaction, and topic. This saves setup and cleanup time before and after each method.

  • Set client operationTimeout to 1s(default value is 30s), This saves retry time for creating consumer & producer: Method testMaxTopicsPerNamespace triggers multiple retries due to reaching the maximum topic limit, this costs 2min

Documentation

  • doc-not-needed

Matching PR in forked repository

PR in forked repository:

@codelipenghui

Copy link
Copy Markdown
Contributor

@poorbarcode Please help resolve the conflicts

@poorbarcode
poorbarcode force-pushed the make_faster/NamespacesTest branch from 4ff6488 to 0519e92 Compare October 13, 2022 07:43
@codecov-commenter

codecov-commenter commented Oct 13, 2022 •

Copy link
Copy Markdown

Codecov Report

Merging #17875 (76179d0) into master (0866c3a) will decrease coverage by 0.20%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #17875      +/-   ##
============================================
- Coverage     38.97%   38.77%   -0.21%     
+ Complexity     8311     8282      -29     
============================================
  Files           683      685       +2     
  Lines         67325    67340      +15     
  Branches       7217     7217              
============================================
- Hits          26239    26108     -131     
- Misses        38079    38243     +164     
+ Partials       3007     2989      -18     
Flag Coverage Δ
unittests 38.77% <100.00%> (-0.21%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...n/java/org/apache/pulsar/broker/PulsarService.java 57.83% <100.00%> (+0.64%) ⬆️
...rvice/schema/KeyValueSchemaCompatibilityCheck.java 21.62% <0.00%> (-45.95%) ⬇️
...java/org/apache/pulsar/proxy/stats/TopicStats.java 58.82% <0.00%> (-41.18%) ⬇️
...lsar/broker/loadbalance/impl/ThresholdShedder.java 3.26% <0.00%> (-39.87%) ⬇️
...org/apache/pulsar/broker/loadbalance/LoadData.java 58.33% <0.00%> (-8.34%) ⬇️
...pulsar/broker/service/PulsarCommandSenderImpl.java 68.71% <0.00%> (-5.65%) ⬇️
...oker/service/schema/SchemaRegistryServiceImpl.java 60.06% <0.00%> (-4.21%) ⬇️
...roker/loadbalance/impl/ModularLoadManagerImpl.java 65.55% <0.00%> (-3.52%) ⬇️
...ransaction/buffer/impl/TopicTransactionBuffer.java 41.56% <0.00%> (-2.83%) ⬇️
...g/apache/pulsar/broker/lookup/TopicLookupBase.java 50.83% <0.00%> (-2.80%) ⬇️
... and 33 more

@poorbarcode

Copy link
Copy Markdown
Contributor Author

/pulsarbot rerun-failure-checks

3 similar comments
@poorbarcode

Copy link
Copy Markdown
Contributor Author

/pulsarbot rerun-failure-checks

@poorbarcode

Copy link
Copy Markdown
Contributor Author

/pulsarbot rerun-failure-checks

@poorbarcode

Copy link
Copy Markdown
Contributor Author

/pulsarbot rerun-failure-checks

@poorbarcode
poorbarcode force-pushed the make_faster/NamespacesTest branch from 0519e92 to d849345 Compare October 14, 2022 01:33
@poorbarcode

Copy link
Copy Markdown
Contributor Author

rebase master

@poorbarcode

Copy link
Copy Markdown
Contributor Author

/pulsarbot rerun-failure-checks

@poorbarcode
poorbarcode force-pushed the make_faster/NamespacesTest branch 2 times, most recently from e766544 to f466f3a Compare October 14, 2022 19:32
@congbobo184

Copy link
Copy Markdown
Contributor

/pulsarbot rerun-failure-checks

1 similar comment
@poorbarcode

Copy link
Copy Markdown
Contributor Author

/pulsarbot rerun-failure-checks

@poorbarcode
poorbarcode force-pushed the make_faster/NamespacesTest branch from 3daddd9 to 491f954 Compare October 28, 2022 02:07
@poorbarcode

Copy link
Copy Markdown
Contributor Author

rebase master

@poorbarcode
poorbarcode force-pushed the make_faster/NamespacesTest branch from 491f954 to 3d31238 Compare October 31, 2022 16:28
@poorbarcode

Copy link
Copy Markdown
Contributor Author

/pulsarbot rerun-failure-checks

@poorbarcode

Copy link
Copy Markdown
Contributor Author

/pulsarbot rerun-failure-checks

@codelipenghui
codelipenghui merged commit 2c2ac1a into apache:master Nov 2, 2022
@poorbarcode
poorbarcode deleted the make_faster/NamespacesTest branch November 4, 2022 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/test doc-not-needed Your PR changes do not impact docs ready-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

slowly-test: org.apache.pulsar.broker.admin.NamespacesTest

4 participants