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

Tests do not unset ThreadLocal values on exit

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6.0
    • Component/s: None
    • Labels:
      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.

        Activity

        Show
        julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/c104c75b .
        Hide
        julianhyde Julian Hyde added a comment -

        Resolved in release 1.6.0 (2016-01-22).

        Show
        julianhyde Julian Hyde added a comment - Resolved in release 1.6.0 (2016-01-22).

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development