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

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

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

NIFI-10890 Replaced HashMap with LinkedHashMap in JsonRowRecordReader

- Updated unit test based on deterministic behavior of LinkedHashMap

This closes #6726

Signed-off-by: David Handermann <[email protected]>


> TestJsonTreeRowRecordReader.testReadRawRecordFieldOrderPreserved uses 
> non-deterministic HashMap 
> ------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-10890
>                 URL: https://issues.apache.org/jira/browse/NIFI-10890
>             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
>         Attachments: org.apache.nifi.json.TestJsonTreeRowRecordReader.txt
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> {code:java}
> org.apache.nifi.json.TestJsonTreeRowRecordReader.testReadRawRecordFieldOrderPreserved{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]   
> TestJsonTreeRowRecordReader.testReadRawRecordFieldOrderPreserved:433 
> expected: <MapRecord[{id=1, name=John Doe, address=123 My Street, city=My 
> City, state=MS, zipCode=11111, country=USA, 
> account=MapRecord[{balance=4750.89, id=42}]}]> but was: <MapRecord[{id=1, 
> name=John Doe, address=123 My Street, city=My City, state=MS, zipCode=11111, 
> country=USA, account=MapRecord[{id=42, balance=4750.89}]}]>{code}
> *Steps to reproduce the failure:*
>  # Run the following command in nifi:
>  # First, build the module:
> {noformat}
> mvn install -pl 
> nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services
>  -DskipTests -Drat.skip -am{noformat}
>  # Then run the test using 
> [NonDex|https://github.com/TestingResearchIllinois/NonDex]
> {noformat}
> mvn edu.illinois:nondex-maven-plugin:1.1.2:nondex -pl 
> nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services
>  
> -Dtest=org.apache.nifi.json.TestJsonTreeRowRecordReader#testReadRawRecordFieldOrderPreserved
>  {noformat}
> The result will be saved under the module folder in .nondex



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to