Yanni Zhou created NIFI-10592:
---------------------------------
Summary: flaky tests caused by the nondeterministic order of
HashMap
Key: NIFI-10592
URL: https://issues.apache.org/jira/browse/NIFI-10592
Project: Apache NiFi
Issue Type: Bug
Reporter: Yanni Zhou
Fix For: 1.16.3
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.testSendData*
*org.apache.nifi.reporting.azure.loganalytics.TestAzureLogAnalyticsProvenanceReportingTask.testAddField2*
*org.apache.nifi.distributed.cache.server.map.DistributedMapCacheTest.testSubMap*
It 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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)