[
https://issues.apache.org/jira/browse/NIFI-10783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17631270#comment-17631270
]
ASF subversion and git services commented on NIFI-10783:
--------------------------------------------------------
Commit ad4e0b05853895ca6f3404ebd8cb27f3960d29f4 in nifi's branch
refs/heads/main from sopan98
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=ad4e0b0585 ]
NIFI-10783 Switched to LinkedHashMap for CompareFuzzyHash
This closes #6639
Signed-off-by: David Handermann <[email protected]>
> TestCompareFuzzyHash.testTLSHCompareFuzzyHashMultipleMatches uses
> non-deterministic HashMap
> --------------------------------------------------------------------------------------------
>
> Key: NIFI-10783
> URL: https://issues.apache.org/jira/browse/NIFI-10783
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Environment: Apache Maven 3.6.0;
> openjdk version "1.8.0_342";
> OpenJDK Runtime Environment (build 1.8.0_342-8u342-b07-0ubuntu1~20.04-b07);
> OpenJDK 64-Bit Server VM (build 25.342-b07, mixed mode);
> Reporter: Sopan Phaltankar
> Assignee: Sopan Phaltankar
> Priority: Trivial
> Fix For: 1.19.0
>
> Attachments:
> org.apache.nifi.processors.cybersecurity.TestCompareFuzzyHash.txt
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> {code:java}
> org.apache.nifi.processors.cybersecurity.TestCompareFuzzyHash.testTLSHCompareFuzzyHashMultipleMatches{code}
> This is a flaky test, it can pass mvn test while but when run using the tool
> [NonDex|https://github.com/TestingResearchIllinois/NonDex], it fails. NonDex
> is a tool that will introduce non-determinism in certain java collections.
> The test shows below:
> {code:java}
> [ERROR] Failures:
> [ERROR] TestCompareFuzzyHash.testTLSHCompareFuzzyHashMultipleMatches:232
> Expected attribute fuzzyhash.value.0.match to be
> nifi-nar-bundles/nifi-lumberjack-bundle/nifi-lumberjack-processors/pom.xml
> but instead it was
> nifi-nar-bundles/nifi-beats-bundle/nifi-beats-processors/pom.xml ==>
> expected:
> <nifi-nar-bundles/nifi-lumberjack-bundle/nifi-lumberjack-processors/pom.xml>
> but was: <nifi-nar-bundles/nifi-beats-bundle/nifi-beats-processors/pom.xml>
> {code}
> *Steps to reproduce the failure:*
> # Run the following command in nifi:
> # First, build the module:
> {noformat}
> mvn install -pl
> nifi-nar-bundles/nifi-cybersecurity-bundle/nifi-cybersecurity-processors
> -DskipTests -Drat.skip -am{noformat}
> # Then run the test using
> [NonDex|https://github.com/TestingResearchIllinois/NonDex]
> {noformat}
> mvn -pl
> nifi-nar-bundles/nifi-cybersecurity-bundle/nifi-cybersecurity-processors
> nondex:nondex
> -Dtest=org.apache.nifi.processors.cybersecurity.TestCompareFuzzyHash#testTLSHCompareFuzzyHashMultipleMatches{noformat}
> The result will be saved under the module folder in .nondex
> Another test, TestCompareFuzzyHash.testSsdeepCompareFuzzyHashMultipleMatches
> depended on the HashMap which was changed as a part of the fix for this JIRA.
> The simple fix for this was to make the order of checking the items the same
> as the insertion order.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)