|
20 | 20 | import com.linkedin.venice.protocols.controller.CreateStoreGrpcResponse; |
21 | 21 | import com.linkedin.venice.protocols.controller.DiscoverClusterGrpcRequest; |
22 | 22 | import com.linkedin.venice.protocols.controller.DiscoverClusterGrpcResponse; |
23 | | -import com.linkedin.venice.protocols.controller.GetClusterHealthStoresGrpcRequest; |
24 | | -import com.linkedin.venice.protocols.controller.GetClusterHealthStoresGrpcResponse; |
25 | 23 | import com.linkedin.venice.protocols.controller.GetKeySchemaGrpcRequest; |
26 | 24 | import com.linkedin.venice.protocols.controller.GetKeySchemaGrpcResponse; |
| 25 | +import com.linkedin.venice.protocols.controller.GetStoreStatusRequest; |
| 26 | +import com.linkedin.venice.protocols.controller.GetStoreStatusResponse; |
27 | 27 | import com.linkedin.venice.protocols.controller.GetValueSchemaGrpcRequest; |
28 | 28 | import com.linkedin.venice.protocols.controller.GetValueSchemaGrpcResponse; |
29 | 29 | import com.linkedin.venice.protocols.controller.LeaderControllerGrpcRequest; |
|
34 | 34 | import com.linkedin.venice.protocols.controller.StoreGrpcServiceGrpc; |
35 | 35 | import com.linkedin.venice.protocols.controller.StoreMigrationCheckGrpcRequest; |
36 | 36 | import com.linkedin.venice.protocols.controller.StoreMigrationCheckGrpcResponse; |
| 37 | +import com.linkedin.venice.protocols.controller.StoreStatus; |
37 | 38 | import com.linkedin.venice.protocols.controller.ValidateStoreDeletedGrpcRequest; |
38 | 39 | import com.linkedin.venice.protocols.controller.ValidateStoreDeletedGrpcResponse; |
39 | 40 | import com.linkedin.venice.protocols.controller.VeniceControllerGrpcServiceGrpc; |
@@ -426,28 +427,26 @@ public void testGetClusterHealthStoresGrpcEndpoint() { |
426 | 427 | assertNotNull(createResponse2, "Response should not be null"); |
427 | 428 |
|
428 | 429 | // 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(); |
431 | 432 |
|
432 | | - GetClusterHealthStoresGrpcResponse healthResponse = storeBlockingStub.getClusterHealthStores(healthRequest); |
| 433 | + GetStoreStatusResponse healthResponse = storeBlockingStub.getClusterHealthStores(healthRequest); |
433 | 434 | assertNotNull(healthResponse, "Response should not be null"); |
434 | 435 | assertEquals(healthResponse.getClusterName(), veniceCluster.getClusterName()); |
435 | 436 |
|
| 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 | + |
436 | 443 | // 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); |
443 | 446 |
|
444 | 447 | // 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"); |
451 | 450 | } |
452 | 451 |
|
453 | 452 | @Test(timeOut = TIMEOUT_MS) |
|
0 commit comments