Skip to content

Commit d62252c

Browse files
pthirunclaude
andcommitted
Fix integration test to use new proto message names
Updated TestControllerGrpcEndpoints.testGetClusterHealthStoresGrpcEndpoint to use the new proto message types: - GetClusterHealthStoresGrpcRequest → GetStoreStatusRequest - GetClusterHealthStoresGrpcResponse → GetStoreStatusResponse - Changed from map access to repeated StoreStatus list This aligns with the proto changes made in commit 12aaa8f which refactored the proto messages per PR review feedback. Test now passes: ✅ testGetClusterHealthStoresGrpcEndpoint PASSED (227 ms) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 12aaa8f commit d62252c

1 file changed

Lines changed: 16 additions & 17 deletions

File tree

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

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
import com.linkedin.venice.protocols.controller.CreateStoreGrpcResponse;
2121
import com.linkedin.venice.protocols.controller.DiscoverClusterGrpcRequest;
2222
import com.linkedin.venice.protocols.controller.DiscoverClusterGrpcResponse;
23-
import com.linkedin.venice.protocols.controller.GetClusterHealthStoresGrpcRequest;
24-
import com.linkedin.venice.protocols.controller.GetClusterHealthStoresGrpcResponse;
2523
import com.linkedin.venice.protocols.controller.GetKeySchemaGrpcRequest;
2624
import com.linkedin.venice.protocols.controller.GetKeySchemaGrpcResponse;
25+
import com.linkedin.venice.protocols.controller.GetStoreStatusRequest;
26+
import com.linkedin.venice.protocols.controller.GetStoreStatusResponse;
2727
import com.linkedin.venice.protocols.controller.GetValueSchemaGrpcRequest;
2828
import com.linkedin.venice.protocols.controller.GetValueSchemaGrpcResponse;
2929
import com.linkedin.venice.protocols.controller.LeaderControllerGrpcRequest;
@@ -34,6 +34,7 @@
3434
import com.linkedin.venice.protocols.controller.StoreGrpcServiceGrpc;
3535
import com.linkedin.venice.protocols.controller.StoreMigrationCheckGrpcRequest;
3636
import com.linkedin.venice.protocols.controller.StoreMigrationCheckGrpcResponse;
37+
import com.linkedin.venice.protocols.controller.StoreStatus;
3738
import com.linkedin.venice.protocols.controller.ValidateStoreDeletedGrpcRequest;
3839
import com.linkedin.venice.protocols.controller.ValidateStoreDeletedGrpcResponse;
3940
import com.linkedin.venice.protocols.controller.VeniceControllerGrpcServiceGrpc;
@@ -426,28 +427,26 @@ public void testGetClusterHealthStoresGrpcEndpoint() {
426427
assertNotNull(createResponse2, "Response should not be null");
427428

428429
// Step 2: Get cluster health stores
429-
GetClusterHealthStoresGrpcRequest healthRequest =
430-
GetClusterHealthStoresGrpcRequest.newBuilder().setClusterName(veniceCluster.getClusterName()).build();
430+
GetStoreStatusRequest healthRequest =
431+
GetStoreStatusRequest.newBuilder().setClusterName(veniceCluster.getClusterName()).build();
431432

432-
GetClusterHealthStoresGrpcResponse healthResponse = storeBlockingStub.getClusterHealthStores(healthRequest);
433+
GetStoreStatusResponse healthResponse = storeBlockingStub.getClusterHealthStores(healthRequest);
433434
assertNotNull(healthResponse, "Response should not be null");
434435
assertEquals(healthResponse.getClusterName(), veniceCluster.getClusterName());
435436

437+
// Convert repeated StoreStatus to map for easier verification
438+
java.util.Map<String, String> storeStatusMap = new java.util.HashMap<>();
439+
for (StoreStatus status: healthResponse.getStoreStatusesList()) {
440+
storeStatusMap.put(status.getStoreName(), status.getStatus());
441+
}
442+
436443
// Verify the stores we created are in the status map
437-
assertTrue(
438-
healthResponse.getStoreStatusMapMap().containsKey(storeName1),
439-
"Store status map should contain " + storeName1);
440-
assertTrue(
441-
healthResponse.getStoreStatusMapMap().containsKey(storeName2),
442-
"Store status map should contain " + storeName2);
444+
assertTrue(storeStatusMap.containsKey(storeName1), "Store status map should contain " + storeName1);
445+
assertTrue(storeStatusMap.containsKey(storeName2), "Store status map should contain " + storeName2);
443446

444447
// Verify the statuses are not null/empty
445-
assertNotNull(
446-
healthResponse.getStoreStatusMapMap().get(storeName1),
447-
"Status for " + storeName1 + " should not be null");
448-
assertNotNull(
449-
healthResponse.getStoreStatusMapMap().get(storeName2),
450-
"Status for " + storeName2 + " should not be null");
448+
assertNotNull(storeStatusMap.get(storeName1), "Status for " + storeName1 + " should not be null");
449+
assertNotNull(storeStatusMap.get(storeName2), "Status for " + storeName2 + " should not be null");
451450
}
452451

453452
@Test(timeOut = TIMEOUT_MS)

0 commit comments

Comments
 (0)