Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-10630

Fixed Possible Json Ordering Permutations Problem in Tests

    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.18.0
    • 1.19.0
    • NiFi Registry
    • None

    Description

      The test file

      nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors
      org.apache.nifi.processors.standard.TestWaitNotifyProtocol
      

      has flakiness with the below three tests.

      testNotifyAttributes
      testNotifyCounters
      testNotifyFirst
      

      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.
      After installing NonDex and run the following code.

      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 
      

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Valvrave Boyu Li
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m