mattisonchao commented on a change in pull request #13534:
URL: https://github.com/apache/pulsar/pull/13534#discussion_r776209102



##########
File path: 
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorTopicPoliciesTest.java
##########
@@ -296,6 +298,37 @@ public void testReplicatorMessageDispatchRatePolicies() 
throws Exception {
                 
assertNull(admin3.topicPolicies(true).getDispatchRate(persistentTopicName)));
     }
 
+    @Test
+    public void testReplicatorOffloadPolicies() throws Exception {
+        final String namespace = "pulsar/partitionedNs-" + UUID.randomUUID();
+        final String persistentTopicName = "persistent://" + namespace + 
"/topic" + UUID.randomUUID();
+
+        init(namespace, persistentTopicName);
+        OffloadPoliciesImpl offloadPolicies =
+                OffloadPoliciesImpl.create("s3", "region", "bucket", 
"endpoint", null, null, null, null,
+                8, 9, 10L, null, OffloadedReadPriority.BOOKKEEPER_FIRST);
+
+        // set offload policies
+        try{
+            admin1.topicPolicies(true).setOffloadPolicies(persistentTopicName, 
offloadPolicies);
+        }catch (Exception ignore){
+            // ignore PersistentTopicsBase#internalUpdateOffloadPolicies not 
found nar loader exception.

Review comment:
       If i do not ignore this exception, i will get  not found nar loader 
exception. 
   
   because of this test is not mock test, should i add a nar package in project 
?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to