[
https://issues.apache.org/jira/browse/NIFI-9818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17509815#comment-17509815
]
ASF subversion and git services commented on NIFI-9818:
-------------------------------------------------------
Commit 8d5de6b292981818e81ffd6cb3b8773c710884ca in nifi's branch
refs/heads/main from 在红尘中成仙
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=8d5de6b ]
NIFI-9818 fix flaky tests
This closes #5883
Signed-off-by: Mike Thomsen <[email protected]>
> Flaky tests due to HashMap/HashSet in nifi-record
> --------------------------------------------------
>
> Key: NIFI-9818
> URL: https://issues.apache.org/jira/browse/NIFI-9818
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Jiazhen Xu
> Priority: Major
>
> Four tests in *nifi-record*
> (org.apache.nifi.serialization.record.TestMapRecord#testDefaultValueWithAliasValue
>
> org.apache.nifi.serialization.record.TestMapRecord#testAliasConflictingAliasValues,
>
> org.apache.nifi.serialization.record.TestDataTypeUtils#testInferTypeWithMapStringKeys,
> and
> org.apache.nifi.serialization.record.TestDataTypeUtils#testInferTypeWithMapNonStringKeys)
> can fail due to the non-deterministic order of iteration of _HashMap_ and
> {_}HashSet{_}.
> One can manifest this problem using
> [[NonDex]([https://github.com/TestingResearchIllinois/NonDex)]]
> {code:java}
> mvn install -pl nifi-commons/nifi-record -am
> mvn -pl nifi-commons/nifi-record
> edu.illinois:nondex-maven-plugin:1.1.2:nondex
> -Dtest=org.apache.nifi.serialization.record.TestMapRecord#testAliasConflictingAliasValues
> mvn -pl nifi-commons/nifi-record
> edu.illinois:nondex-maven-plugin:1.1.2:nondex
> -Dtest=org.apache.nifi.serialization.record.TestMapRecord#testDefaultValueWithAliasValue
> mvn -pl nifi-commons/nifi-record
> edu.illinois:nondex-maven-plugin:1.1.2:nondex
> -Dtest=org.apache.nifi.serialization.record.TestDataTypeUtils#testInferTypeWithMapStringKeys
> mvn -pl nifi-commons/nifi-record
> edu.illinois:nondex-maven-plugin:1.1.2:nondex
> -Dtest=org.apache.nifi.serialization.record.TestDataTypeUtils#testInferTypeWithMapNonStringKe
> {code}
> Use LinkedHashMap/LinkedHashSet instead of HashMap/HashSet in the test can
> solve the problem.
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)