Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
hameizi committed Oct 14, 2022
1 parent b0a5e7a commit fb5eaed
Showing 1 changed file with 4 additions and 4 deletions.
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());
}
}

0 comments on commit fb5eaed

Please sign in to comment.