Skip to content

Commit 46a6ba2

Browse files
committed
Fix flaky test
1 parent 787c45c commit 46a6ba2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,13 @@ public void testHybridBatchPushWithInvalidRmd(boolean useNativeInputFormat) thro
185185
.setStorageQuotaInByte(Store.UNLIMITED_STORAGE_QUOTA)
186186
.setHybridRewindSeconds(streamingRewindSeconds)
187187
.setHybridOffsetLagThreshold(streamingMessageLag)));
188-
controllerClient.emptyPush(storeName, Utils.getUniqueString("empty-hybrid-push"), 1L);
188+
TestUtils.assertCommand(
189+
controllerClient.sendEmptyPushAndWait(storeName, Utils.getUniqueString("empty-hybrid-push"), 1L, 120000));
189190
File inputDir = getTempDataDirectory();
190191
String inputDirPath = "file://" + inputDir.getAbsolutePath();
192+
// records 1-100
191193
TestWriteUtils
192-
.writeSimpleAvroFileWithStringToStringAndTimestampSchema(inputDir, String.valueOf(123456789L).getBytes()); // records
193-
// 1-100
194+
.writeSimpleAvroFileWithStringToStringAndTimestampSchema(inputDir, String.valueOf(123456789L).getBytes());
194195
Properties vpjProperties = defaultVPJProps(sharedVenice, inputDirPath, storeName);
195196
vpjProperties.setProperty(RMD_FIELD_PROP, "rmd");
196197
vpjProperties.setProperty(DATA_WRITER_COMPUTE_JOB_CLASS, DataWriterSparkJob.class.getCanonicalName());
@@ -202,7 +203,8 @@ public void testHybridBatchPushWithInvalidRmd(boolean useNativeInputFormat) thro
202203
Assert.expectThrows(VeniceException.class, () -> IntegrationTestPushUtils.runVPJ(vpjProperties));
203204
Assert.assertTrue(
204205
failureException.getMessage().contains("Input rmd schema does not match the server side RMD schema"),
205-
"The exception message does not match with the expected one RMD validation failure");
206+
"The exception message does not match with the expected one RMD validation failure. Got: "
207+
+ failureException.getMessage());
206208
}
207209
}
208210

0 commit comments

Comments
 (0)