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

Sopan Phaltankar updated NIFI-10862:
------------------------------------
    Description: 
{code:java}
1. org.apache.nifi.xml.TestXMLReader.testAttributePrefix
2. 
org.apache.nifi.xml.TestXMLReader.testInferSchemaContentFieldNameNotSetSubElementExists
3. org.apache.nifi.xml.TestXMLReader.testInferSchema
4. 
org.apache.nifi.xml.TestXMLReader.testInferSchemaContentFieldNameSetSubElementExistsNoNameClash
5. org.apache.nifi.xml.TestXMLReader.testInferSchemaIgnoreAttributes
6. org.apache.nifi.xml.TestXMLReader.testInferSchemaContentFieldNameNotSet
7. org.apache.nifi.xml.TestXMLReader.testContentField
8. 
org.apache.nifi.xml.TestXMLReader.testInferSchemaContentFieldNameSetSubElementExistsNameClash{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}
1. org.apache.nifi.xml.TestXMLReader.testAttributePrefix
[ERROR]   TestXMLReader.testAttributePrefix:150 expected: 
<MapRecord[{COUNTRY=USA, ATTR_ID=P1, NAME=Cleve Butler, AGE=42}]> but was: 
<MapRecord[{AGE=42, ATTR_ID=P1, NAME=Cleve Butler, COUNTRY=USA}]>

2. 
org.apache.nifi.xml.TestXMLReader.testInferSchemaContentFieldNameNotSetSubElementExists
[ERROR]   
TestXMLReader.testInferSchemaContentFieldNameNotSetSubElementExists:239 
expected: <MapRecord[{field_with_attribute=MapRecord[{attr=attr_content, 
value=123}]}]> but was: <MapRecord[{field_with_attribute=MapRecord[{value=123, 
attr=attr_content}]}]>

3. org.apache.nifi.xml.TestXMLReader.testInferSchema
[ERROR]   TestXMLReader.testInferSchema:201 expected: 
<MapRecord[{software=MapRecord[{content_field=Apache NiFi, favorite=true}], 
num=123, name=John Doe}]> but was: <MapRecord[{name=John Doe, num=123, 
software=MapRecord[{content_field=Apache NiFi, favorite=true}]}]>

4. 
org.apache.nifi.xml.TestXMLReader.testInferSchemaContentFieldNameSetSubElementExistsNoNameClash
[ERROR]   
TestXMLReader.testInferSchemaContentFieldNameSetSubElementExistsNoNameClash:280 
expected: <MapRecord[{field_with_attribute=MapRecord[{content_field=content of 
field, attr=attr_content, value=123}]}]> but was: 
<MapRecord[{field_with_attribute=MapRecord[{attr=attr_content, value=123, 
content_field=content of field}]}]>

5. org.apache.nifi.xml.TestXMLReader.testInferSchemaIgnoreAttributes
[ERROR]   TestXMLReader.testInferSchemaIgnoreAttributes:299 expected: 
<MapRecord[{software=Apache NiFi, num=123, name=John Doe}]> but was: 
<MapRecord[{name=John Doe, software=Apache NiFi, num=123}]>

6. org.apache.nifi.xml.TestXMLReader.testInferSchemaContentFieldNameNotSet
[ERROR]   TestXMLReader.testInferSchemaContentFieldNameNotSet:220 expected: 
<MapRecord[{software=MapRecord[{favorite=true}], num=123, name=John Doe}]> but 
was: <MapRecord[{name=John Doe, num=123, software=MapRecord[{favorite=true}]}]>

7. org.apache.nifi.xml.TestXMLReader.testContentField
[ERROR]   TestXMLReader.testContentField:177 expected: <MapRecord[{ID=P1, 
NAME=MapRecord[{CONTENT=Cleve Butler, ATTR=attr content, INNER=inner content}], 
AGE=42}]> but was: <MapRecord[{NAME=MapRecord[{CONTENT=Cleve Butler, ATTR=attr 
content, INNER=inner content}], ID=P1, AGE=42}]>

8. 
org.apache.nifi.xml.TestXMLReader.testInferSchemaContentFieldNameSetSubElementExistsNameClash
[ERROR]   
TestXMLReader.testInferSchemaContentFieldNameSetSubElementExistsNameClash:259 
expected: <MapRecord[{field_with_attribute=MapRecord[{attr=attr_content, 
value=content of field}]}]> but was: 
<MapRecord[{field_with_attribute=MapRecord[{value=content of field, 
attr=attr_content}]}]>{code}
*Steps to reproduce the failure:*
 # Run the following command in nifi:
 # First, build the module:

{noformat}
mvn install -pl nifi-nar-bundles/nifi-hbase-bundle/nifi-hbase-processors 
-DskipTests -Drat.skip -am{noformat}
 # Then run the test using 
[NonDex|https://github.com/TestingResearchIllinois/NonDex]

{noformat}
1. mvn -pl nifi-nar-bundles/nifi-hbase-bundle/nifi-hbase-processors 
edu.illinois:nondex-maven-plugin:1.1.2:nondex 
-Dtest=org.apache.nifi.hbase.TestScanHBase#testScanToContentWithStringValues

2. mvn -pl nifi-nar-bundles/nifi-hbase-bundle/nifi-hbase-processors 
edu.illinois:nondex-maven-plugin:1.1.2:nondex 
-Dtest=org.apache.nifi.hbase.TestScanHBase#testScanToContentWithQualifierAndValueJSON{noformat}
 

The result will be saved under the module folder in .nondex

  was:
{code:java}
1. org.apache.nifi.hbase.TestScanHBase#testScanToContentWithStringValues
2. 
org.apache.nifi.hbase.TestScanHBase#testScanToContentWithQualifierAndValueJSON{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}
1. org.apache.nifi.hbase.TestScanHBase.testScanToContentWithStringValues  
Time elapsed: 0.267 s  <<< FAILURE!
org.opentest4j.AssertionFailedError: 
expected: <[{"row":"row1", "cells": 
[{"fam":"nifi","qual":"cq1","val":"val1","ts":123456789}, 
{"fam":"nifi","qual":"cq2","val":"val2","ts":123456789}]},
{"row":"row2", "cells": 
[{"fam":"nifi","qual":"cq1","val":"val1","ts":123456789}, 
{"fam":"nifi","qual":"cq2","val":"val2","ts":123456789}]}]> but was: 
<[{"row":"row1", "cells": 
[{"fam":"nifi","qual":"cq2","val":"val2","ts":123456789}, 
{"fam":"nifi","qual":"cq1","val":"val1","ts":123456789}]},
{"row":"row2", "cells": 
[{"fam":"nifi","qual":"cq1","val":"val1","ts":123456789}, 
{"fam":"nifi","qual":"cq2","val":"val2","ts":123456789}]}]>

2. 
org.apache.nifi.hbase.TestScanHBase#testScanToContentWithQualifierAndValueJSON
Time elapsed: 0.019 s  <<< FAILURE!
org.opentest4j.AssertionFailedError: expected: <[{"cq1":"val1", "cq2":"val2"}]> 
but was: <[{"cq2":"val2", "cq1":"val1"}]>{code}
*Steps to reproduce the failure:*
 # Run the following command in nifi:
 # First, build the module:

{noformat}
mvn install -pl nifi-nar-bundles/nifi-hbase-bundle/nifi-hbase-processors 
-DskipTests -Drat.skip -am{noformat}
 # Then run the test using 
[NonDex|https://github.com/TestingResearchIllinois/NonDex]

{noformat}
1. mvn -pl nifi-nar-bundles/nifi-hbase-bundle/nifi-hbase-processors 
edu.illinois:nondex-maven-plugin:1.1.2:nondex 
-Dtest=org.apache.nifi.hbase.TestScanHBase#testScanToContentWithStringValues

2. mvn -pl nifi-nar-bundles/nifi-hbase-bundle/nifi-hbase-processors 
edu.illinois:nondex-maven-plugin:1.1.2:nondex 
-Dtest=org.apache.nifi.hbase.TestScanHBase#testScanToContentWithQualifierAndValueJSON{noformat}
 

The result will be saved under the module folder in .nondex


> Tests in TestXMLReader use non-deterministic HashMap 
> -----------------------------------------------------
>
>                 Key: NIFI-10862
>                 URL: https://issues.apache.org/jira/browse/NIFI-10862
>             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
>
>
> {code:java}
> 1. org.apache.nifi.xml.TestXMLReader.testAttributePrefix
> 2. 
> org.apache.nifi.xml.TestXMLReader.testInferSchemaContentFieldNameNotSetSubElementExists
> 3. org.apache.nifi.xml.TestXMLReader.testInferSchema
> 4. 
> org.apache.nifi.xml.TestXMLReader.testInferSchemaContentFieldNameSetSubElementExistsNoNameClash
> 5. org.apache.nifi.xml.TestXMLReader.testInferSchemaIgnoreAttributes
> 6. org.apache.nifi.xml.TestXMLReader.testInferSchemaContentFieldNameNotSet
> 7. org.apache.nifi.xml.TestXMLReader.testContentField
> 8. 
> org.apache.nifi.xml.TestXMLReader.testInferSchemaContentFieldNameSetSubElementExistsNameClash{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}
> 1. org.apache.nifi.xml.TestXMLReader.testAttributePrefix
> [ERROR]   TestXMLReader.testAttributePrefix:150 expected: 
> <MapRecord[{COUNTRY=USA, ATTR_ID=P1, NAME=Cleve Butler, AGE=42}]> but was: 
> <MapRecord[{AGE=42, ATTR_ID=P1, NAME=Cleve Butler, COUNTRY=USA}]>
> 2. 
> org.apache.nifi.xml.TestXMLReader.testInferSchemaContentFieldNameNotSetSubElementExists
> [ERROR]   
> TestXMLReader.testInferSchemaContentFieldNameNotSetSubElementExists:239 
> expected: <MapRecord[{field_with_attribute=MapRecord[{attr=attr_content, 
> value=123}]}]> but was: 
> <MapRecord[{field_with_attribute=MapRecord[{value=123, attr=attr_content}]}]>
> 3. org.apache.nifi.xml.TestXMLReader.testInferSchema
> [ERROR]   TestXMLReader.testInferSchema:201 expected: 
> <MapRecord[{software=MapRecord[{content_field=Apache NiFi, favorite=true}], 
> num=123, name=John Doe}]> but was: <MapRecord[{name=John Doe, num=123, 
> software=MapRecord[{content_field=Apache NiFi, favorite=true}]}]>
> 4. 
> org.apache.nifi.xml.TestXMLReader.testInferSchemaContentFieldNameSetSubElementExistsNoNameClash
> [ERROR]   
> TestXMLReader.testInferSchemaContentFieldNameSetSubElementExistsNoNameClash:280
>  expected: <MapRecord[{field_with_attribute=MapRecord[{content_field=content 
> of field, attr=attr_content, value=123}]}]> but was: 
> <MapRecord[{field_with_attribute=MapRecord[{attr=attr_content, value=123, 
> content_field=content of field}]}]>
> 5. org.apache.nifi.xml.TestXMLReader.testInferSchemaIgnoreAttributes
> [ERROR]   TestXMLReader.testInferSchemaIgnoreAttributes:299 expected: 
> <MapRecord[{software=Apache NiFi, num=123, name=John Doe}]> but was: 
> <MapRecord[{name=John Doe, software=Apache NiFi, num=123}]>
> 6. org.apache.nifi.xml.TestXMLReader.testInferSchemaContentFieldNameNotSet
> [ERROR]   TestXMLReader.testInferSchemaContentFieldNameNotSet:220 expected: 
> <MapRecord[{software=MapRecord[{favorite=true}], num=123, name=John Doe}]> 
> but was: <MapRecord[{name=John Doe, num=123, 
> software=MapRecord[{favorite=true}]}]>
> 7. org.apache.nifi.xml.TestXMLReader.testContentField
> [ERROR]   TestXMLReader.testContentField:177 expected: <MapRecord[{ID=P1, 
> NAME=MapRecord[{CONTENT=Cleve Butler, ATTR=attr content, INNER=inner 
> content}], AGE=42}]> but was: <MapRecord[{NAME=MapRecord[{CONTENT=Cleve 
> Butler, ATTR=attr content, INNER=inner content}], ID=P1, AGE=42}]>
> 8. 
> org.apache.nifi.xml.TestXMLReader.testInferSchemaContentFieldNameSetSubElementExistsNameClash
> [ERROR]   
> TestXMLReader.testInferSchemaContentFieldNameSetSubElementExistsNameClash:259 
> expected: <MapRecord[{field_with_attribute=MapRecord[{attr=attr_content, 
> value=content of field}]}]> but was: 
> <MapRecord[{field_with_attribute=MapRecord[{value=content of field, 
> attr=attr_content}]}]>{code}
> *Steps to reproduce the failure:*
>  # Run the following command in nifi:
>  # First, build the module:
> {noformat}
> mvn install -pl nifi-nar-bundles/nifi-hbase-bundle/nifi-hbase-processors 
> -DskipTests -Drat.skip -am{noformat}
>  # Then run the test using 
> [NonDex|https://github.com/TestingResearchIllinois/NonDex]
> {noformat}
> 1. mvn -pl nifi-nar-bundles/nifi-hbase-bundle/nifi-hbase-processors 
> edu.illinois:nondex-maven-plugin:1.1.2:nondex 
> -Dtest=org.apache.nifi.hbase.TestScanHBase#testScanToContentWithStringValues
> 2. mvn -pl nifi-nar-bundles/nifi-hbase-bundle/nifi-hbase-processors 
> edu.illinois:nondex-maven-plugin:1.1.2:nondex 
> -Dtest=org.apache.nifi.hbase.TestScanHBase#testScanToContentWithQualifierAndValueJSON{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