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/11 23:47:00 UTC
[jira] [Created] (NIFI-10630) Fixed Possible Json Ordering Permutations Problem in Tests
Boyu Li created NIFI-10630:
------------------------------
Summary: Fixed Possible Json Ordering Permutations Problem in Tests
Key: NIFI-10630
URL: https://issues.apache.org/jira/browse/NIFI-10630
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
Fix For: 1.18.0
The test file
{code:java}
org.apache.nifi.processors.standard.TestWaitNotifyProtocol
{code}
has flakiness with the below three tests.
{code:java}
testNotifyAttributes
testNotifyCounters
testNotifyFirst
{code}
The test flakiness is due to comparisons between Json Strings and outputs from
cacheEntry.getValue() which is an Object AtomicCacheEntry<String, String, Long>
However, JsonObject does not guarantee entry orders, its object is an unordered set of name/value pairs, and internal permutations may occur in the output as JSON 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-standard-bundle/nifi-standard-processors -am -DskipTests
mvn -pl nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors edu.illinois:nondex-
maven-plugin:1.1.3-SNAPSHOT:nondex -
Dtest=org.apache.nifi.processors.standard.TestWaitNotifyProtocol#testNotifyCounters
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)