Julian Hyde created CALCITE-915:
-----------------------------------

             Summary: Tests do not unset ThreadLocal values on exit
                 Key: CALCITE-915
                 URL: https://issues.apache.org/jira/browse/CALCITE-915
             Project: Calcite
          Issue Type: Bug
            Reporter: Julian Hyde
            Assignee: Julian Hyde


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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to