Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HUDI-5030]fix ut TestPartialUpdateAvroPayload.testUseLatestRecordMetaValue #6948

Merged
merged 1 commit into from
Oct 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ public void testUseLatestRecordMetaValue() throws IOException {
record1.put("child", Arrays.asList("A"));

GenericRecord record2 = new GenericData.Record(schema);
record1.put("_hoodie_commit_time", "20220915000000001");
record1.put("_hoodie_commit_seqno", "20220915000000001_2_000");
record2.put("_hoodie_commit_time", "20220915000000001");
record2.put("_hoodie_commit_seqno", "20220915000000001_2_000");
record2.put("id", "1");
record2.put("partition", "partition1");
record2.put("ts", 1L);
Expand All @@ -204,7 +204,7 @@ public void testUseLatestRecordMetaValue() throws IOException {

// let payload2 as the latest one, then should use payload2's meta field's value as the result
GenericRecord mergedRecord2 = (GenericRecord) payload2.preCombine(payload1, schema, properties).getInsertValue(schema, properties).get();
assertEquals(mergedRecord2.get("_hoodie_commit_time").toString(), "20220915000000001");
assertEquals(mergedRecord2.get("_hoodie_commit_seqno").toString(), "20220915000000001_2_000");
assertEquals(mergedRecord2.get("_hoodie_commit_time").toString(), record2.get("_hoodie_commit_time").toString());
assertEquals(mergedRecord2.get("_hoodie_commit_seqno").toString(), record2.get("_hoodie_commit_seqno").toString());
}
}