Skip to content
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

[fix][flaky-test]NamespaceOwnershipListenerTests.testNamespaceBundleOwnershipListener #17807

Conversation

poorbarcode
Copy link
Contributor

@poorbarcode poorbarcode commented Sep 23, 2022

Fixes: flaky test NamespaceOwnershipListenerTests.testNamespaceBundleOwnershipListener

 org.apache.pulsar.client.admin.PulsarAdminException$ConflictException: Cannot delete non empty bundle
  	at org.apache.pulsar.client.admin.PulsarAdminException.wrap(PulsarAdminException.java:252)
  	at org.apache.pulsar.client.admin.internal.BaseResource.sync(BaseResource.java:351)
  	at org.apache.pulsar.client.admin.internal.NamespacesImpl.deleteNamespace(NamespacesImpl.java:226)
  	at org.apache.pulsar.broker.namespace.NamespaceOwnershipListenerTests.testNamespaceBundleOwnershipListener(NamespaceOwnershipListenerTests.java:104)
  	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.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:45)
  	at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:73)
  	at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:11)
  	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
  	at java.base/java.lang.Thread.run(Thread.java:833)
  	Suppressed: org.apache.pulsar.client.admin.PulsarAdminException$ConflictException: Cannot delete non empty bundle
  		at org.apache.pulsar.client.admin.internal.BaseResource.getApiException(BaseResource.java:287)
  		at org.apache.pulsar.client.admin.internal.BaseResource$4.failed(BaseResource.java:237)
  		at org.glassfish.jersey.client.JerseyInvocation$1.failed(JerseyInvocation.java:882)
  		at org.glassfish.jersey.client.JerseyInvocation$1.completed(JerseyInvocation.java:863)

Motivation

same as #17070, there have race condition:

  • delete namespace bundle
  • asynchronously create topic __change_event

Modifications

  • Make delete namespace after __change_event and __change_event/__compaction create finish.
  • As more as possible, change all the namespace deletion in test, exinclude these case
    • admin API V1
    • multiple brokers in test
    • pulsar proxy
    • has disabled feature: system topic

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:

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Sep 23, 2022
@poorbarcode poorbarcode force-pushed the flaky/testNamespaceBundleOwnershipListener branch 2 times, most recently from b592d58 to f3fdc47 Compare September 23, 2022 04:05
@poorbarcode poorbarcode force-pushed the flaky/testNamespaceBundleOwnershipListener branch 3 times, most recently from 9bb068b to ad13282 Compare September 23, 2022 08:22
@poorbarcode poorbarcode force-pushed the flaky/testNamespaceBundleOwnershipListener branch from ad13282 to 8033180 Compare September 23, 2022 08:49
@codelipenghui codelipenghui added this to the 2.12.0 milestone Sep 23, 2022
@codelipenghui codelipenghui merged commit c85b89b into apache:master Sep 24, 2022
@poorbarcode poorbarcode deleted the flaky/testNamespaceBundleOwnershipListener branch September 26, 2022 01:54
Technoboy- pushed a commit that referenced this pull request Nov 4, 2022
@Technoboy- Technoboy- modified the milestones: 2.12.0, 2.11.0 Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-picked/branch-2.11 doc-not-needed Your PR changes do not impact docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants