Skip to content

Commit

Permalink
Reduce unit test time.
Browse files Browse the repository at this point in the history
  • Loading branch information
shibd committed Jan 12, 2025
1 parent 7f9dcec commit 5f8ee19
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,10 @@ public void testReplicatedSubscriptionWithCompaction() throws Exception {
public void testReplicatedSubscriptionOneWay() throws Exception {
final String namespace = BrokerTestUtil.newUniqueName("pulsar-r4/replicatedsubscription");
final String topicName = "persistent://" + namespace + "/one-way";
config1.setReplicatedSubscriptionsSnapshotTimeoutSeconds(10);
int defaultSubscriptionsSnapshotFrequency = config1.getReplicatedSubscriptionsSnapshotFrequencyMillis();
int defaultSubscriptionsSnapshotTimeout = config1.getReplicatedSubscriptionsSnapshotTimeoutSeconds();
config1.setReplicatedSubscriptionsSnapshotTimeoutSeconds(2);
config1.setReplicatedSubscriptionsSnapshotFrequencyMillis(100);

// cluster4 disabled ReplicatedSubscriptions
admin1.tenants().createTenant("pulsar-r4",
Expand Down Expand Up @@ -1083,6 +1086,10 @@ public void testReplicatedSubscriptionOneWay() throws Exception {
}
}
Assert.assertEquals(numSnapshotRequest, 2);

// Set back to default config.
config1.setReplicatedSubscriptionsSnapshotTimeoutSeconds(defaultSubscriptionsSnapshotTimeout);
config1.setReplicatedSubscriptionsSnapshotFrequencyMillis(defaultSubscriptionsSnapshotFrequency);
}

/**
Expand Down

0 comments on commit 5f8ee19

Please sign in to comment.