You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Boyu Li (Jira)" <ji...@apache.org> on 2022/10/24 22:36:00 UTC

[jira] [Updated] (NIFI-10692) Possible Array Ordering Permutations Problem in Tests

     [ https://issues.apache.org/jira/browse/NIFI-10692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Boyu Li updated NIFI-10692:
---------------------------
    Description: 
Following the problem of flakiness that occurred in the project
{code:java}
nifi-nar-bundles/nifi-asn1-bundle/nifi-asn1-services{code}
test file
{code:java}
org.apache.nifi.jasn1.TestJASN1RecordReaderWithComplexTypes{code}

with below three tests


{code:java}
testBasicTypes
testRecursive
testInheritance{code}


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}

  was:
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}


> 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
>            Priority: Minor
>
> Following the problem of flakiness that occurred in the project
> {code:java}
> nifi-nar-bundles/nifi-asn1-bundle/nifi-asn1-services{code}
> test file
> {code:java}
> org.apache.nifi.jasn1.TestJASN1RecordReaderWithComplexTypes{code}
> with below three tests
> {code:java}
> testBasicTypes
> testRecursive
> testInheritance{code}
> 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)