review: test: Fixed nondeterministic failures in ProcessingTest.testInitPropertiesWithWrongType()#6500
Merged
monperrus merged 2 commits intoINRIA:masterfrom Nov 8, 2025
Conversation
… valid and invalid property initialization
Collaborator
|
Thanks a lot @yonghanlin We like short PRs to improve tests. Tip: avoid opening many PRs at once, it's easily overwhelming for maintainers. Prefer opening them one by one, one after the other, once the previous one has been merged. |
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 does this PR do?
This PR draws inspiration from the earlier PR #6084, which has not seen recent activity. The fix has been re-implemented on the current codebase and updated accordingly. In particular, this PR fixes a nondeterministic test failure in
ProcessingTest.testInitPropertiesWithWrongType()when running with NonDex.Problem
The failures occur when the test applies multiple processor properties within a single
ProcessorPropertiesinitialization. In the test,aString,anObject, andanIntwere set within the sameProcessorPropertiesinstance. Depending on iteration order, theanIntproperty could be processed before the validaStringandanObject, causinginitProperties()to throw before they were set.Reproduce Test
To reproduce the failure, run NonDex on
.module using the following commands:The Fix
The test is restructured into two initialization phases:
aString,anObject) and verify they are correctly set.anInt="foo") separately and verify that it triggersSpoonExceptionwhile leaving other properties unchanged.