Skip to content

Commit

Permalink
fix flaky test in AdminApiOffloadTest (#11028)
Browse files Browse the repository at this point in the history
(cherry picked from commit 1a80429)
  • Loading branch information
hangc0276 authored and codelipenghui committed Dec 11, 2021
1 parent 0c48d23 commit bdb27c2
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -277,6 +277,8 @@ public void testOffload(boolean isPartitioned) throws Exception {
Map<NamespaceName, LedgerOffloader> map = new HashMap<>();
map.put(TopicName.get(topicName).getNamespaceObject(), namespaceOffloader);
doReturn(map).when(pulsar).getLedgerOffloaderMap();
doReturn(namespaceOffloader).when(pulsar)
.getManagedLedgerOffloader(TopicName.get(topicName).getNamespaceObject(), null);

admin.topics().removeOffloadPolicies(topicName);
Awaitility.await().atMost(10, TimeUnit.SECONDS).untilAsserted(()
Expand Down

0 comments on commit bdb27c2

Please sign in to comment.