Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8697

2 Order-Dependent Flaky Tests for CachedOutputStream

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 4.0.0
    • 4.0.0
    • Core
    • Unknown

    Description

      The tests org.apache.cxf.io.CacheAndWriteOutputStreamTest.testDeleteTmpFile and org.apache.cxf.io.CachedOutputStreamTest.testDeleteTmpFile fail when run by themselves with the command mvn test because the temporary file is null. The reason is because createFileOutPutStream is never called in the method enforceLimits in the CachedOutputStream class since the threshold instance variable is not greater than the totalLength variable. The threshold variable depends on the static variable defaultThreshold. The defaultThreshold also depends on the system property. Therefore, these tests pass when the whole test suite is run because a different test, such as testUseSysProps, changes the static variable along with the system property.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jchen8460 Justin Chen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: