codelipenghui commented on a change in pull request #13534:
URL: https://github.com/apache/pulsar/pull/13534#discussion_r783266722
##########
File path:
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorTopicPoliciesTest.java
##########
@@ -483,6 +485,38 @@ public void testReplicatorCompactionThresholdPolicies()
throws Exception {
assertNull(admin3.topicPolicies(true).getCompactionThreshold(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 exception){
+ // driver not found exception.
+ assertTrue(exception instanceof
PulsarAdminException.ServerSideErrorException);
+ }
Review comment:
```suggestion
try {
admin1.topicPolicies(true).setOffloadPolicies(persistentTopicName,
offloadPolicies);
} catch (Exception exception){
// driver not found exception.
assertTrue(exception instanceof
PulsarAdminException.ServerSideErrorException);
}
```
--
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]