Skip to content

Commit 9f2967e

Browse files
pthirunclaude
andcommitted
[test] Set uncleanLeaderElectionEnabledForRTTopics in UpdateStore test
constructions Fix NPE during Avro serialization in tests that construct UpdateStore records without initializing the uncleanLeaderElectionEnabledForRTTopics field. Also remove duplicate blobDbEnabled assignments left over from merge. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent dfd9f60 commit 9f2967e

4 files changed

Lines changed: 5 additions & 3 deletions

File tree

internal/venice-test-common/src/integrationTest/java/com/linkedin/venice/controller/kafka/consumer/AdminConsumptionTaskIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,8 @@ private byte[] getStoreUpdateMessage(
427427
updateStore.storeLifecycleHooks = Collections.emptyList();
428428
updateStore.blobTransferInServerEnabled = ConfigCommonUtils.ActivationState.NOT_SPECIFIED.name();
429429
updateStore.blobDbEnabled = ConfigCommonUtils.ActivationState.NOT_SPECIFIED.name();
430+
updateStore.uncleanLeaderElectionEnabledForRTTopics = ConfigCommonUtils.ActivationState.NOT_SPECIFIED.name();
430431
updateStore.keyUrnFields = Collections.emptyList();
431-
updateStore.blobDbEnabled = "NOT_SPECIFIED";
432432
return adminOperationSerializer.serialize(adminMessage, writerSchemaId);
433433
}
434434

internal/venice-test-common/src/integrationTest/java/com/linkedin/venice/controller/kafka/consumer/AdminConsumptionWithProtocolRollbackIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,8 @@ private byte[] getStoreUpdateMessage(
296296
updateStore.storeLifecycleHooks = Collections.emptyList();
297297
updateStore.blobTransferInServerEnabled = ConfigCommonUtils.ActivationState.NOT_SPECIFIED.name();
298298
updateStore.blobDbEnabled = ConfigCommonUtils.ActivationState.NOT_SPECIFIED.name();
299+
updateStore.uncleanLeaderElectionEnabledForRTTopics = ConfigCommonUtils.ActivationState.NOT_SPECIFIED.name();
299300
updateStore.keyUrnFields = Collections.emptyList();
300-
updateStore.blobDbEnabled = "NOT_SPECIFIED";
301301
return adminOperationSerializer.serialize(adminMessage, writerSchemaId);
302302
}
303303

internal/venice-test-common/src/integrationTest/java/com/linkedin/venice/endToEnd/TestMultiDataCenterAdminOperations.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,8 @@ private byte[] getStoreUpdateMessage(
302302
updateStore.storeLifecycleHooks = Collections.emptyList();
303303
updateStore.blobTransferInServerEnabled = ConfigCommonUtils.ActivationState.NOT_SPECIFIED.name();
304304
updateStore.blobDbEnabled = ConfigCommonUtils.ActivationState.NOT_SPECIFIED.name();
305+
updateStore.uncleanLeaderElectionEnabledForRTTopics = ConfigCommonUtils.ActivationState.NOT_SPECIFIED.name();
305306
updateStore.keyUrnFields = Collections.emptyList();
306-
updateStore.blobDbEnabled = "NOT_SPECIFIED";
307307
return adminOperationSerializer
308308
.serialize(adminMessage, AdminOperationSerializer.LATEST_SCHEMA_ID_FOR_ADMIN_OPERATION);
309309
}

services/venice-controller/src/test/java/com/linkedin/venice/controller/kafka/protocol/admin/SemanticDetectorTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public void testTraverse() {
5050
updateStore.replicateAllConfigs = true;
5151
updateStore.updatedConfigsList = Collections.emptyList();
5252
updateStore.blobDbEnabled = "NOT_SPECIFIED";
53+
updateStore.uncleanLeaderElectionEnabledForRTTopics = "NOT_SPECIFIED";
5354

5455
HybridStoreConfigRecord hybridStoreConfig = new HybridStoreConfigRecord();
5556
hybridStoreConfig.rewindTimeInSeconds = 123L;
@@ -293,6 +294,7 @@ public void testDefaultFieldValue() {
293294
updateStore.replicateAllConfigs = true;
294295
updateStore.updatedConfigsList = Collections.emptyList();
295296
updateStore.blobDbEnabled = "NOT_SPECIFIED";
297+
updateStore.uncleanLeaderElectionEnabledForRTTopics = "NOT_SPECIFIED";
296298

297299
// Default value of this field is 60
298300
updateStore.targetSwapRegionWaitTime = 10;

0 commit comments

Comments
 (0)