question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flaky-test: NamespacesTest.testDeleteNamespaceWithBundles

See original GitHub issue

NamespacesTest.testDeleteNamespaceWithBundles is flaky. It fails sporadically.

example failure

Error:  testDeleteNamespaceWithBundles(org.apache.pulsar.broker.admin.NamespacesTest)  Time elapsed: 5.182 s  <<< FAILURE!
Wanted but not invoked:
asyncResponse.resume(<Capturing argument>);
-> at org.apache.pulsar.broker.admin.NamespacesTest.testDeleteNamespaceWithBundles(NamespacesTest.java:853)

However, there was exactly 1 interaction with this mock:
asyncResponse.resume(
    org.apache.pulsar.broker.web.RestException: Failed to find ownership for ServiceUnit:my-tenant/use/test-delete-namespace-with-bundles/0x00000000_0x80000000
);
-> at org.apache.pulsar.broker.admin.AdminResource.resumeAsyncResponseExceptionally(AdminResource.java:761)


	at org.apache.pulsar.broker.admin.NamespacesTest.testDeleteNamespaceWithBundles(NamespacesTest.java:853)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	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:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Technoboy-commented, Mar 1, 2022

This flaky test might be related to #14215 . @Technoboy- please check

Ok.

0reactions
shibdcommented, Mar 4, 2022

Sorry, I didn’t reproduce for local. I looked at the test code. It should be that the following code sequence is wrong.

Before delete a namespace, We should mock all done. 847 lines of code should be executed after 851 lines of code.

https://github.com/apache/pulsar/blob/4f1e39b6921ea401b8c27f17a041d06d85f8abf8/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/NamespacesTest.java#L847-L851

Otherwise, a null pointer may happen during verification isServiceUnitOwned

https://github.com/apache/pulsar/blob/4f1e39b6921ea401b8c27f17a041d06d85f8abf8/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java#L584

Final throw RestException

https://github.com/apache/pulsar/blob/4f1e39b6921ea401b8c27f17a041d06d85f8abf8/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java#L608-L610

@Jason918 PTAL

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pulsar-Weekly - StreamNative
[Broker] Fix the flaky test NamespacesTest.testDeleteNamespaceWithBundles . https://github.com/apache/pulsar/pull/14552 by shibd; [C++ Client] Fix wrong units ...
Read more >
FlakyTest - Android Developers
Designates a test as being flaky (non-deterministic). Can then be used to filter tests on execution using -e annotation or -e notAnnotation as...
Read more >
Flaky-test:namespacestest.TestDeletenamespaceWithBundles ...
Flaky-test : NamespacesTest.testDeleteNamespaceWithBundlesnamespacestest.TestDeletenamespaceWithBundles是Flaky 的。它偶尔失败了。
Read more >
Questions about HW-aware training and inference - IBM/Aihwkit
YOU MAY BE INTERESTED ; Flaky-test: NamespacesTest.testDeleteNamespaceWithBundles, 7, 2022-03-01, 2022-09-25 ; Add source url to markup, 1, 2021-08-26, 2022-09-07.
Read more >
Page listing header: new designs - Wagtail/Wagtail - IssueHint
Flaky-test : NamespacesTest.testDeleteNamespaceWithBundles, 7, 2022-03-01, 2022-08-14. Popular Frameworks. Flutter · React Native · Vue · React · Pandas ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found