afa41b16ea
testutils.SetupTestOSContext() sets the calling thread's network namespace but neglected to restore it on teardown. This was not a problem in practice as it called runtime.LockOSThread() twice but runtime.UnlockOSThread() only once, so the tampered threads would be terminated by the runtime when the test case returned and replaced with a clean thread. Correct the utility so it restores the thread's network namespace during teardown and unlocks the goroutine from the thread on success. Remove unnecessary runtime.LockOSThread() calls peppering test cases which leverage testutils.SetupTestOSContext(). Signed-off-by: Cory Snider <csnider@mirantis.com> |
||
---|---|---|
.. | ||
context_unix.go | ||
context_windows.go | ||
net.go |