Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-11727

Do not rely on order of JSON attributes in test

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • Servlets Get 2.2.0
    • Servlets
    • None

    Description

      The tests JsonRendererTest#testBooleansNoTidy and JsonRendererTest#testBooleansNoTidy#testBooleansWithTidy passed using normal maven-test, but showed Non-deterministic behavior under NonDex(https://github.com/TestingResearchIllinois/NonDex) and thus failed. After some probing, I found the output from the test is not deterministic.

       

      Steps to reproduce the failure:

      Install Nondex(https://github.com/TestingResearchIllinois/NonDex) in the environment. 

      Then cd to nifi repository, and run the following:

      mvn install -pl . -am -DskipTests
      
      mvn -pl . test -Dtest=org.apache.sling.servlets.get.impl.helpers.JsonRendererTest#testBooleansNoTidy
      
      mvn -pl . edu.illinois:nondex-maven-plugin:2.1:nondex -Dtest=org.apache.sling.servlets.get.impl.helpers.JsonRendererTest#testBooleansNoTidy

      Attachments

        Issue Links

          Activity

            People

              kwin Konrad Windszus
              priyanka_a Priyanka Awatramani
              Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 2h 20m
                  2h 20m