Skip to content

Initialize NullValueHandlingConfig for failed tests #13078

Merged
FrankChen021 merged 3 commits intoapache:masterfrom
a2l007:nullhandletests
Sep 15, 2022
Merged

Initialize NullValueHandlingConfig for failed tests #13078
FrankChen021 merged 3 commits intoapache:masterfrom
a2l007:nullhandletests

Conversation

@a2l007
Copy link
Copy Markdown
Contributor

@a2l007 a2l007 commented Sep 12, 2022

When run independently, tests DelegateOrMinKeyCollectorTest and QuantilesSketchKeyCollectorTest currently fail with the following error:

[ERROR] Errors: 
[ERROR] org.apache.druid.msq.statistics.DelegateOrMinKeyCollectorTest.testAdd
[ERROR]   Run 1: DelegateOrMinKeyCollectorTest.testAdd:81->createKey:148 » IllegalState NullHandling module not initialized, call NullHandling.initializeForTests()
[ERROR] org.apache.druid.msq.statistics.DelegateOrMinKeyCollectorTest.testDownSampleSingleKey
[ERROR]   Run 1: DelegateOrMinKeyCollectorTest.testDownSampleSingleKey:99->createKey:148 » IllegalState NullHandling module not initialized, call NullHandling.initializeForTests()
[ERROR] org.apache.druid.msq.statistics.DelegateOrMinKeyCollectorTest.testDownSampleTwoKeys
[ERROR]   Run 1: DelegateOrMinKeyCollectorTest.testDownSampleTwoKeys:125->createKey:148 » IllegalState NullHandling module not initialized, call NullHandling.initializeForTests()
[ERROR] org.apache.druid.msq.statistics.QuantilesSketchKeyCollectorTest.test_sequentialKeys_unweighted
[ERROR]   Run 1: QuantilesSketchKeyCollectorTest.test_sequentialKeys_unweighted:66 » IllegalState NullHandling module not initialized, call NullHandling.initializeForTests()
[ERROR] org.apache.druid.msq.statistics.QuantilesSketchKeyCollectorTest.test_uniformRandomKeys_barbellWeighted
[ERROR]   Run 1: QuantilesSketchKeyCollectorTest.test_uniformRandomKeys_barbellWeighted:136 » IllegalState NullHandling module not initialized, call NullHandling.initializeForTests()
[ERROR] org.apache.druid.msq.statistics.QuantilesSketchKeyCollectorTest.test_uniformRandomKeys_inverseBarbellWeighted
[ERROR]   Run 1: QuantilesSketchKeyCollectorTest.test_uniformRandomKeys_inverseBarbellWeighted:163 » IllegalState NullHandling module not initialized, call NullHandling.initializeForTests()
[ERROR]   Run 1: QuantilesSketchKeyCollectorTest.test_uniformRandomKeys_unweighted:85 » IllegalState NullHandling module not initialized, call NullHandling.initializeForTests()
ERROR] org.apache.druid.msq.statistics.QuantilesSketchKeyCollectorTest.test_uniformRandomKeys_unweighted_downSampledToSmallestSize
[ERROR]   Run 1: QuantilesSketchKeyCollectorTest.test_uniformRandomKeys_unweighted_downSampledToSmallestSize:103 » IllegalState NullHandling module not initialized, call NullHandling.initializeForTests()

This PR initializes the NullValueHandlingConfig to fix these tests.


This PR has:

  • been self-reviewed.

Copy link
Copy Markdown
Contributor

@kfaraz kfaraz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following the example of other tests, I think it would be better to do the NullHandling.initializeForTests() in the test class themselves rather than the utils class.

@a2l007
Copy link
Copy Markdown
Contributor Author

a2l007 commented Sep 13, 2022

@kfaraz Thanks for the review. Refactored the tests based on your comment.

Copy link
Copy Markdown
Contributor

@kfaraz kfaraz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix, @a2l007 🚀

@kfaraz
Copy link
Copy Markdown
Contributor

kfaraz commented Sep 14, 2022

@a2l007 , you might need to merge the latest master to fix the build failures using #13083

@FrankChen021 FrankChen021 merged commit c153c2a into apache:master Sep 15, 2022
@kfaraz kfaraz added this to the 25.0 milestone Nov 22, 2022
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.

3 participants