Make test and test-case depend on compile; better env var name
No need to lock here since m_closeReason is volatile
The condition in HasCloseReason should be inverted
Initial tests for IConnection.Close