Skip to content

Commit

Permalink
fix flaky test in AdminApiOffloadTest (#11028)
Browse files Browse the repository at this point in the history
  • Loading branch information
hangc0276 committed Jun 23, 2021
1 parent cad0542 commit 1a80429
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -47,7 +47,6 @@
import org.apache.pulsar.common.naming.NamespaceName;
import org.apache.pulsar.common.naming.TopicName;
import org.apache.pulsar.common.policies.data.ClusterData;
import org.apache.pulsar.common.policies.data.ClusterDataImpl;
import org.apache.pulsar.common.policies.data.OffloadPolicies;
import org.apache.pulsar.common.policies.data.OffloadPoliciesImpl;
import org.apache.pulsar.common.policies.data.OffloadedReadPriority;
Expand Down Expand Up @@ -335,6 +334,8 @@ private 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().untilAsserted(()
Expand Down

0 comments on commit 1a80429

Please sign in to comment.