Skip to content

Commit

Permalink
Wait and refresh router metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
sushantmane committed Oct 25, 2023
1 parent 4339871 commit 61f43d7
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ public void testIncrementalPushPartialUpdateClassicFormat() throws IOException {
runVPJ(vpjProperties, 1, childControllerClient);
}
VeniceClusterWrapper veniceClusterWrapper = childDatacenters.get(0).getClusters().get(CLUSTER_NAME);
veniceClusterWrapper.waitVersion(storeName, 1);
try (AvroGenericStoreClient<Object, Object> storeReader = ClientFactory.getAndStartGenericAvroClient(
ClientConfig.defaultGenericClientConfig(storeName).setVeniceURL(veniceClusterWrapper.getRandomRouterURL()))) {
TestUtils.waitForNonDeterministicAssertion(10, TimeUnit.SECONDS, true, () -> {
Expand Down Expand Up @@ -385,6 +386,8 @@ public void testIncrementalPushPartialUpdateNewFormat() throws IOException {
runVPJ(vpjProperties, 1, childControllerClient);
}
VeniceClusterWrapper veniceClusterWrapper = childDatacenters.get(0).getClusters().get(CLUSTER_NAME);
veniceClusterWrapper.waitVersion(storeName, 1);

try (AvroGenericStoreClient<Object, Object> storeReader = ClientFactory.getAndStartGenericAvroClient(
ClientConfig.defaultGenericClientConfig(storeName).setVeniceURL(veniceClusterWrapper.getRandomRouterURL()))) {
TestUtils.waitForNonDeterministicAssertion(10, TimeUnit.SECONDS, true, () -> {
Expand Down Expand Up @@ -448,6 +451,7 @@ public void testPartialUpdateOnBatchPushedKeys(CompressionStrategy compressionSt
try (ControllerClient childControllerClient = new ControllerClient(CLUSTER_NAME, childControllerUrl)) {
runVPJ(vpjProperties, 1, childControllerClient);
}
veniceClusterWrapper.waitVersion(storeName, 1);
// Produce partial updates on batch pushed keys
SystemProducer veniceProducer = getSamzaProducer(veniceClusterWrapper, storeName, Version.PushType.STREAM);
for (int i = 1; i < 100; i++) {
Expand Down Expand Up @@ -1025,7 +1029,7 @@ public void testWriteComputeWithHybridLeaderFollowerLargeRecord(
try (ControllerClient childControllerClient = new ControllerClient(CLUSTER_NAME, childControllerUrl)) {
runVPJ(vpjProperties, 1, childControllerClient);
}

veniceClusterWrapper.waitVersion(storeName, 1);
try (AvroGenericStoreClient<Object, Object> storeReader = ClientFactory.getAndStartGenericAvroClient(
ClientConfig.defaultGenericClientConfig(storeName)
.setVeniceURL(veniceClusterWrapper.getRandomRouterURL()))) {
Expand Down

0 comments on commit 61f43d7

Please sign in to comment.