Skip to content

Commit

Permalink
[MINOR] fix cdc flake ut (apache#7016)
Browse files Browse the repository at this point in the history
  • Loading branch information
YannByron authored and fengjian committed Apr 5, 2023
1 parent ea92e40 commit 3848e71
Showing 1 changed file with 1 addition and 8 deletions.
Expand Up @@ -588,15 +588,8 @@ class TestCDCDataFrameSuite extends HoodieCDCTestBase {
.save(basePath)
val instant2 = metaClient.reloadActiveTimeline.lastInstant().get()

val cdcLogFiles2 = getCDCLogFile(instant2)
// with a small value for 'hoodie.logfile.data.max.size',
// it will write out >1 cdc log files due to rollover.
assert(cdcLogFiles2.size > 1)
// with a small value for 'hoodie.logfile.data.block.max.size',
// it will write out >1 cdc data blocks in one single cdc log file.
assert(getCDCBlocks(cdcLogFiles2.head, cdcSchema).size > 1)

// check cdc data
val cdcLogFiles2 = getCDCLogFile(instant2)
val cdcDataFromCDCLogFile2 = cdcLogFiles2.flatMap(readCDCLogFile(_, cdcSchema))
// check the num of cdc data
assertEquals(cdcDataFromCDCLogFile2.size, 50)
Expand Down

0 comments on commit 3848e71

Please sign in to comment.