Move the test to outside the thread