[ 
https://issues.apache.org/jira/browse/NIFI-10592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17613237#comment-17613237
 ] 

ASF subversion and git services commented on NIFI-10592:
--------------------------------------------------------

Commit bcec883344534ca466d5c74bece2c4f2e81e3bd5 in nifi's branch 
refs/heads/main from Yanni
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=bcec883344 ]

NIFI-10592 This closes #6486. fix flaky tests using wrong map impl.

Signed-off-by: Joe Witt <[email protected]>


> 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
>            Priority: Minor
>             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)

Reply via email to