pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[fix][test] Flaky-test: AdminApiMultiBrokersTest.testForceDeletePartitionedTopicWithSub

Open crossoverJie opened this issue 1 year ago • 0 comments

Fixes #22428

Motivation

java.util.concurrent.ExecutionException: org.apache.pulsar.client.admin.PulsarAdminException$ConflictException: This topic already exists
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
	at org.apache.pulsar.broker.admin.AdminApiMultiBrokersTest.testForceDeletePartitionedTopicWithSub(AdminApiMultiBrokersTest.java:208)

ConflictException can be ignored.

Modifications

  • Check again whether the topic exists.
  • Ignore ConflictException.

Verifying this change

  • [x] Make sure that the change passes the CI checks.

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • [ ] Dependencies (add or upgrade a dependency)
  • [ ] The public API
  • [ ] The schema
  • [ ] The default values of configurations
  • [ ] The threading model
  • [ ] The binary protocol
  • [ ] The REST endpoints
  • [ ] The admin CLI options
  • [ ] The metrics
  • [ ] Anything that affects deployment

Documentation

  • [ ] doc
  • [ ] doc-required
  • [x] doc-not-needed
  • [ ] doc-complete

Matching PR in forked repository

PR in forked repository: https://github.com/crossoverJie/pulsar/pull/24

crossoverJie avatar Apr 26 '24 02:04 crossoverJie