Fix test deadlock and other failures #3751
Merged
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.
Identify the Bug or Feature request
Fixes (hopefully) #3750
Description of the Change
The
CampaignPropertiesDialogTest
is now run on the Swing thread in order to avoid deadlocks that would sometimes occur when running on the main test thread.The
GetInfoFunctionTest
is now repeatable and not dependent on the order of the tests. The problem was that one test was injecting a dummySysInfoProvider
that could be consumed by the other test. This is fixed by always restoring theSysInfoProvider
implementation after each test.The
MemoryDataStoreTest
was sensitive to the ordering of its various asynchronous calls. Meanwhile,MemoryDataStore
does not guarantee the ordering of effects as it runs everything on the common fork-join pool. Sprinkling in some more.get()
fixes that.Prior to this change, I could only complete a few test suite runs before encountering a deadlock or other failure. With this change, I have been consistently able to complete thousands of test suite runs, each completing promptly.
Possible Drawbacks
Should be sunshine and rainbows.
Documentation Notes
N/A
Release Notes
N/A
This change is