Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-915

Tests do not unset ThreadLocal values on exit

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.6.0
    • None
    • None

    Description

      A few tests give different results if run as part of the suite than if run individually. The reason is that previous tests that share the same ThreadLocal instances had not set the value back on exit.

      Add a class TryThreadLocal extends ThreadLocal with a 'push' method that returns a Closeable memo that can be used in a try-with-resources block. The memo remembers the previous value and assigned that when close is called.

      Attachments

        Activity

          People

            julianhyde Julian Hyde
            julianhyde Julian Hyde
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: