Boyu Li created NIFI-10692: ------------------------------ Summary: Possible Array Ordering Permutations Problem in Tests Key: NIFI-10692 URL: https://issues.apache.org/jira/browse/NIFI-10692 Project: Apache NiFi Issue Type: Test Components: NiFi Registry Affects Versions: 1.18.0 Environment: Apache Maven 3.6.3 Java version: 11.0.16, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "5.4.0-124-generic", arch: "amd64", family: "unix" Reporter: Boyu Li
Following the problem of flakiness that occurred in the project `nifi-nar-bundles/nifi-asn1-bundle/nifi-asn1-services` test file `org.apache.nifi.jasn1.TestJASN1RecordReaderWithComplexTypes` with below three tests ``` testBasicTypes testRecursive testInheritance ``` All three above tests use the same file, `JASN1ReadRecordTester` as the tester. The test flakiness is due to comparisons between two ArrayList outputs from Class `SimpleRecordSchema` which use ArrayList to store one of the parameter `List<RecordField>` However, ArrayList does not guarantee entry orders, its object is an unordered set of name/value pairs, and internal permutations may occur in the output as a String. *Steps to reproduce the failure:* The flakiness was found with [NonDex.|https://github.com/TestingResearchIllinois/NonDex)] After installing NonDex and run the following code. {code:java} cd nifi mvn install -pl nifi-nar-bundles/nifi-asn1-bundle/nifi-asn1-services -am -DskipTests mvn -pl nifi-nar-bundles/nifi-asn1-bundle/nifi-asn1-services edu.illinois:nondex- maven-plugin:1.1.3-SNAPSHOT:nondex - Dtest=org.apache.nifi.jasn1.TestJASN1RecordReaderWithComplexTypes#testBasicTypes {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)