Skip to content

Comments

fix flaky test org.apache.druid.math.expr.ParserTest#testApplyFunctio…#13471

Closed
Kerr0220 wants to merge 1 commit intoapache:masterfrom
Kerr0220:fix-flaky-test
Closed

fix flaky test org.apache.druid.math.expr.ParserTest#testApplyFunctio…#13471
Kerr0220 wants to merge 1 commit intoapache:masterfrom
Kerr0220:fix-flaky-test

Conversation

@Kerr0220
Copy link

@Kerr0220 Kerr0220 commented Dec 1, 2022

Fixes #13470.

Description

Fix the flaky test mentioned in #13470 by replacing HashSet with LinkedHashSet in Expr.map().

Changes to fix the flaky test

  1. Convert the HashSet into LinkedHashSet
  2. Change the expected value into the deterministic order

Result

Re-run these commands and it should pass now:

MODULE=core
TEST=org.apache.druid.math.expr.ParserTest#testApplyFunctions  
mvn install -pl $MODULE -am -DskipTests 
mvn -pl $MODULE edu.illinois:nondex-maven-plugin:1.1.2:nondex -Dtest=$TEST

Result:

[INFO] NonDex SUMMARY:
[INFO] *********
[INFO] mvn nondex:nondex  -DnondexFilter='.*' -DnondexMode=FULL -DnondexSeed=933178 -DnondexStart=0 -DnondexEnd=9223372036854775807 -DnondexPrintstack=false -DnondexDir="/home/yiteng3/druid/core/.nondex" -DnondexJarDir="/home/yiteng3/druid/core/.nondex" -DnondexExecid=V0S2aNJMV7Af2A8+Be1QmzoUNsMgpuDZ3IQbfiuBZbk= -DnondexLogging=CONFIG
[INFO] No Test Failed with this configuration.
[INFO] *********
[INFO] *********
[INFO] mvn nondex:nondex  -DnondexFilter='.*' -DnondexMode=FULL -DnondexSeed=974622 -DnondexStart=0 -DnondexEnd=9223372036854775807 -DnondexPrintstack=false -DnondexDir="/home/yiteng3/druid/core/.nondex" -DnondexJarDir="/home/yiteng3/druid/core/.nondex" -DnondexExecid=BRUAYRxHlbLxOPTn2BHrfmnneeNYCm9MlfK4BhV5GB4= -DnondexLogging=CONFIG
[INFO] No Test Failed with this configuration.
[INFO] *********
[INFO] *********
[INFO] mvn nondex:nondex  -DnondexFilter='.*' -DnondexMode=FULL -DnondexSeed=1016066 -DnondexStart=0 -DnondexEnd=9223372036854775807 -DnondexPrintstack=false -DnondexDir="/home/yiteng3/druid/core/.nondex" -DnondexJarDir="/home/yiteng3/druid/core/.nondex" -DnondexExecid=SUrm6oMmflgc4QfTKnVBP92yUnUqb3+947WZRegSxo= -DnondexLogging=CONFIG
[INFO] No Test Failed with this configuration.
[INFO] *********
[INFO] Across all seeds:
[INFO] Test results can be found at: 
[INFO] file:///home/yiteng3/druid/core/.nondex/V0S2aNJMV7Af2A8+Be1QmzoUNsMgpuDZ3IQbfiuBZbk=/test_results.html
[INFO] [NonDex] The id of this run is: V0S2aNJMV7Af2A8+Be1QmzoUNsMgpuDZ3IQbfiuBZbk=
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  35.726 s
[INFO] Finished at: 2022-12-01T00:36:29-06:00
[INFO] ------------------------------------------------------------------------

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

@abhishekagarwal87
Copy link
Contributor

Closing this PR since I have not seen this test flaking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Flaky Test] druid-core org.apache.druid.math.expr.ParserTest#testApplyFunctions

3 participants