[#1219] fix(test): Fix the flaky test WriteAndReadMetricsTest - #1235
Merged
Conversation
WriteAndReadMetricsTestWriteAndReadMetricsTest
3 tasks
roryqi
pushed a commit
that referenced
this pull request
Oct 17, 2023
### What changes were proposed in this pull request? Add a little wait time before verify the result ### Why are the changes needed? Usually this happens in spark2.3 integration test ``` Error: Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 31.317 s <<< FAILURE! - in org.apache.uniffle.test.WriteAndReadMetricsTest Error: test Time elapsed: 28.47 s <<< FAILURE! org.opentest4j.AssertionFailedError: expected: <55> but was: <54> 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:182) at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:177) at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1141) at org.apache.uniffle.test.SparkIntegrationTestBase.verifyTestResult(SparkIntegrationTestBase.java:130) at org.apache.uniffle.test.SparkIntegrationTestBase.run(SparkIntegrationTestBase.java:67) at org.apache.uniffle.test.WriteAndReadMetricsTest.test(WriteAndReadMetricsTest.java:40) ``` Inspired by [SPARK-24415](https://issues.apache.org/jira/browse/SPARK-24415) It might be an order of events type problem, taskEndEvent trigger the metric updates, while stageCompletion trigger the stageData updates ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Run local test in a loop of 100 times without a failure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Add a little wait time before verify the result
Why are the changes needed?
Usually this happens in spark2.3 integration test
Inspired by SPARK-24415
It might be an order of events type problem, taskEndEvent trigger the metric updates, while stageCompletion trigger the stageData updates
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Run local test in a loop of 100 times without a failure