Skip to content

Commit

Permalink
Add @JsonIgnore for isReplicateSubscriptionState and remove usage
Browse files Browse the repository at this point in the history
Signed-off-by: Zixuan Liu <[email protected]>
  • Loading branch information
nodece committed Dec 20, 2024
1 parent d62c897 commit 1f9d5c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,10 @@ public ConsumerConfigurationData<T> clone() {
}

/**
* Backward compatibility with the old `replicateSubscriptionState` field.
* @deprecated Using {@link #getReplicateSubscriptionState()} instead.
*/
@JsonIgnore
@Deprecated
public boolean isReplicateSubscriptionState() {
return replicateSubscriptionState != null && replicateSubscriptionState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ public void testLoadConf() throws Exception {
assertTrue(configurationData.isRetryEnable());
assertFalse(configurationData.isAutoUpdatePartitions());
assertEquals(configurationData.getAutoUpdatePartitionsIntervalSeconds(), 2);
assertTrue(configurationData.isReplicateSubscriptionState());
assertEquals(configurationData.getReplicateSubscriptionState(), Boolean.TRUE);

Check failure on line 507 in pulsar-client/src/test/java/org/apache/pulsar/client/impl/ConsumerBuilderImplTest.java

View workflow job for this annotation

GitHub Actions / CI - Unit - Pulsar Client

ConsumerBuilderImplTest.testLoadConf

expected [true] but found [null]
assertTrue(configurationData.isResetIncludeHead());
assertTrue(configurationData.isBatchIndexAckEnabled());
assertTrue(configurationData.isAckReceiptEnabled());
Expand Down Expand Up @@ -564,7 +564,7 @@ public void testLoadConfNotModified() {
assertFalse(configurationData.isRetryEnable());
assertTrue(configurationData.isAutoUpdatePartitions());
assertEquals(configurationData.getAutoUpdatePartitionsIntervalSeconds(), 60);
assertFalse(configurationData.isReplicateSubscriptionState());
assertEquals(configurationData.getReplicateSubscriptionState(), Boolean.FALSE);
assertFalse(configurationData.isResetIncludeHead());
assertFalse(configurationData.isBatchIndexAckEnabled());
assertFalse(configurationData.isAckReceiptEnabled());
Expand Down

0 comments on commit 1f9d5c8

Please sign in to comment.