Skip to content

[MINOR] Fix flaky test testDeletePartitionsV2#13207

Merged
danny0405 merged 1 commit intoapache:masterfrom
yihua:MINOR-fix-flakiness
Apr 23, 2025
Merged

[MINOR] Fix flaky test testDeletePartitionsV2#13207
danny0405 merged 1 commit intoapache:masterfrom
yihua:MINOR-fix-flakiness

Conversation

@yihua
Copy link
Contributor

@yihua yihua commented Apr 22, 2025

Change Logs

This PR fixes the flaky test testDeletePartitionsV2 as shown below. The root cause is that the test expects 3 partitions to be written by deletePartitionSetup but the random record generator can generate records in fewer partitions due to how the partition path value is set.

https://github.com/apache/hudi/actions/runs/14589199410/job/40920578922

Error:  Tests run: 57, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 172.08 s <<< FAILURE! - in org.apache.hudi.TestHoodieSparkSqlWriter
Error:  testDeletePartitionsV2{boolean}[2]  Time elapsed: 3.315 s  <<< FAILURE!
org.opentest4j.AssertionFailedError: expected: <6> but was: <4>
	at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
	at org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:150)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:145)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:527)
	at org.apache.hudi.TestHoodieSparkSqlWriter.validateDataAndPartitionStats(TestHoodieSparkSqlWriter.scala:902)
	at org.apache.hudi.TestHoodieSparkSqlWriter.testDeletePartitionsV2(TestHoodieSparkSqlWriter.scala:859)

Impact

Fixes the test flakiness and makes CI stable

Risk level

none

Documentation Update

none

Contributor's checklist

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed

@github-actions github-actions bot added the size:XS PR with lines of changes in <= 10 label Apr 22, 2025
@hudi-bot
Copy link
Collaborator

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@danny0405 danny0405 merged commit 6caf7c6 into apache:master Apr 23, 2025
60 checks passed
cshuo pushed a commit to cshuo/hudi that referenced this pull request Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS PR with lines of changes in <= 10

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants