Skip to content

[fix] [test] Fix failed test#18125

Closed
hangc0276 wants to merge 1 commit intoapache:masterfrom
hangc0276:chenhang/fix_failed_test
Closed

[fix] [test] Fix failed test#18125
hangc0276 wants to merge 1 commit intoapache:masterfrom
hangc0276:chenhang/fix_failed_test

Conversation

@hangc0276
Copy link
Contributor

Motivation

The following test keeps failing.

Error:  Tests run: 119, Failures: 1, Errors: 0, Skipped: 117, Time elapsed: 193.66 s <<< FAILURE! - in org.apache.pulsar.broker.service.persistent.PersistentSubscriptionMessageDispatchStreamingDispatcherThrottlingTest
  Error:  setup(org.apache.pulsar.broker.service.persistent.PersistentSubscriptionMessageDispatchStreamingDispatcherThrottlingTest)  Time elapsed: 2.492 s  <<< FAILURE!
  java.lang.RuntimeException: broker already started!
  	at org.apache.pulsar.broker.auth.MockedPulsarServiceBaseTest.startBroker(MockedPulsarServiceBaseTest.java:325)
  	at org.apache.pulsar.broker.auth.MockedPulsarServiceBaseTest.init(MockedPulsarServiceBaseTest.java:230)
  	at org.apache.pulsar.broker.auth.MockedPulsarServiceBaseTest.internalSetup(MockedPulsarServiceBaseTest.java:155)
  	at org.apache.pulsar.client.api.MessageDispatchThrottlingTest.setup(MessageDispatchThrottlingTest.java:70)
  	at org.apache.pulsar.broker.service.persistent.PersistentSubscriptionMessageDispatchStreamingDispatcherThrottlingTest.setup(PersistentSubscriptionMessageDispatchStreamingDispatcherThrottlingTest.java:36)
  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
  	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
  	at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:61)
  	at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:366)
  	at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:320)
  	at org.testng.internal.TestInvoker.runConfigMethods(TestInvoker.java:701)
  	at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:527)
  	at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
  	at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
  	at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
  	at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
  	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
  	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
  	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
  	at org.testng.TestRunner.privateRun(TestRunner.java:764)
  	at org.testng.TestRunner.run(TestRunner.java:585)
  	at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
  	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
  	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
  	at org.testng.SuiteRunner.run(SuiteRunner.java:286)
  	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
  	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
  	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
  	at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
  	at org.testng.TestNG.runSuites(TestNG.java:1069)
  	at org.testng.TestNG.run(TestNG.java:1037)
  	at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:135)
  	at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeSingleClass(TestNGDirectoryTestSuite.java:112)
  	at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeLazy(TestNGDirectoryTestSuite.java:123)
  	at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:90)
  	at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:146)
  	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
  	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
  	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
  	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)

https://github.com/apache/pulsar/actions/runs/3272194693/jobs/5407200669

Modification

Skip call setup in before methods.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

hangc0276#6

@hangc0276 hangc0276 self-assigned this Oct 20, 2022
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Oct 20, 2022
@hangc0276 hangc0276 added area/test and removed doc-not-needed Your PR changes do not impact docs labels Oct 20, 2022
@hangc0276 hangc0276 added this to the 2.11.0 milestone Oct 20, 2022
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Oct 20, 2022
@codecov-commenter
Copy link

codecov-commenter commented Oct 20, 2022

Codecov Report

Merging #18125 (fbfb8c2) into master (6c65ca0) will increase coverage by 14.84%.
The diff coverage is 68.96%.

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #18125       +/-   ##
=============================================
+ Coverage     34.91%   49.76%   +14.84%     
- Complexity     5707     6980     +1273     
=============================================
  Files           607      393      -214     
  Lines         53396    43428     -9968     
  Branches       5712     4466     -1246     
=============================================
+ Hits          18644    21611     +2967     
+ Misses        32119    19401    -12718     
+ Partials       2633     2416      -217     
Flag Coverage Δ
unittests 49.76% <68.96%> (+14.84%) ⬆️

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

Impacted Files Coverage Δ
.../pulsar/broker/service/AbstractBaseDispatcher.java 54.48% <ø> (+8.62%) ⬆️
...che/pulsar/broker/service/BacklogQuotaManager.java 12.39% <0.00%> (+2.91%) ⬆️
.../service/SystemTopicBasedTopicPoliciesService.java 62.97% <0.00%> (+11.38%) ⬆️
.../pulsar/broker/stats/BrokerOperabilityMetrics.java 98.21% <ø> (+5.56%) ⬆️
...g/apache/pulsar/compaction/CompactedTopicImpl.java 69.28% <0.00%> (+58.57%) ⬆️
.../org/apache/pulsar/broker/admin/v2/Namespaces.java 56.85% <50.00%> (+48.82%) ⬆️
...ache/pulsar/broker/service/EntryFilterSupport.java 27.02% <50.00%> (+2.02%) ⬆️
...apache/pulsar/proxy/server/DirectProxyHandler.java 63.63% <50.00%> (ø)
...broker/delayed/InMemoryDelayedDeliveryTracker.java 65.00% <75.00%> (+65.00%) ⬆️
...sistent/PersistentDispatcherMultipleConsumers.java 58.25% <85.71%> (+6.55%) ⬆️
... and 365 more

@Technoboy-
Copy link
Contributor

Closed by #18115

@Technoboy- Technoboy- closed this Oct 20, 2022
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants