Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-20686

camel-core: review File tests for incorrectly shared resources

    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.6.0
    • 4.x
    • camel-core
    • Novice

    Description

      We have lots of file tests in core that run in parallel and try to write to the same file. This leads to a lot of flakiness in file tests.

       

      Look for tests doing things like testFile("output.txt") or testFile("input.txt") or other similar repetitive names (i.e.: foo, bar, etc) should be considered suspicious and need careful review.

       

      The tests should be adjusted to one of the following (in order of preference):

      • Use separate resources for each test (i.e: "input." + TestClass.class.getSimpleName() + ".txt")
      • Use JUnit's 5 temporary file provider
      • Use resource locks via JUnit's @ResourceLock annotation.
      • Or Isolated if safe to do so

      Attachments

        Activity

          People

            Unassigned Unassigned
            orpiske Otavio Rodolfo Piske
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: