updated threading in testcase for cleaner output