NIFI-10592-Fix flaky tests caused by the nondeterministic order of HashMap#6486
Closed
yannizhou05 wants to merge 2 commits intoapache:mainfrom
Closed
NIFI-10592-Fix flaky tests caused by the nondeterministic order of HashMap#6486yannizhou05 wants to merge 2 commits intoapache:mainfrom
yannizhou05 wants to merge 2 commits intoapache:mainfrom
Conversation
Contributor
|
fixed the checkstyle issue and merged. thanks |
p-kimberley
pushed a commit
to p-kimberley/nifi
that referenced
this pull request
Oct 15, 2022
…mpl. Signed-off-by: Joe Witt <joewitt@apache.org>
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.
Summary
NIFI-10592
The tests below were found flaky because of the use of HashMaps and HashSet. The orders of elements in the HashMaps and HashSet are not the same every time being called. In this case, LinkedHashMap and LinkedHashSet is applied to replace Hash in order to ensure the orders are not changing.
org.apache.nifi.reporting.prometheus.TestPrometheusRecordSink.testSendDataorg.apache.nifi.reporting.azure.loganalytics.TestAzureLogAnalyticsProvenanceReportingTask.testAddField2org.apache.nifi.distributed.cache.server.map.DistributedMapCacheTest.testSubMapIt matters to fix this flaky test as it may cause potential issues due to the uncertainty of orders from HashMaps and HashSet rather than the program itself.
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000NIFI-00000Pull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn install -pl nifi-nar-bundles -am -DskipTestsTest:
mvn -pl nifi-nar-bundles/nifi-prometheus-bundle/nifi-prometheus-reporting-task edu.illinois:nondex-maven-plugin:1.1.2:nondex -Dtest=org.apache.nifi.reporting.prometheus.TestPrometheusRecordSink#testSendDatamvn -pl nifi-nar-bundles/nifi-azure-bundle/nifi-azure-reporting-task edu.illinois:nondex-maven-plugin:1.1.2:nondex -Dtest=org.apache.nifi.reporting.azure.loganalytics.TestAzureLogAnalyticsProvenanceReportingTask#testAddField2mvn -pl nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server edu.illinois:nondex-maven-plugin:1.1.2:nondex -Dtest=org.apache.nifi.distributed.cache.server.map.DistributedMapCacheTest#testSubMapLicensing
LICENSEandNOTICEfilesDocumentation