From ec7da23dcde0f262ec038dd64a9aefa69b8a2cc4 Mon Sep 17 00:00:00 2001 From: dmaclach Date: Thu, 15 Nov 2018 11:22:52 -0800 Subject: Fix up race in testPThreadName. (#211) The block must execute before the test completes. --- Foundation/GTMNSThread+BlocksTest.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Foundation/GTMNSThread+BlocksTest.m b/Foundation/GTMNSThread+BlocksTest.m index 5eeb186..b7e0cdb 100644 --- a/Foundation/GTMNSThread+BlocksTest.m +++ b/Foundation/GTMNSThread+BlocksTest.m @@ -316,7 +316,7 @@ static const int kThreadMethoduSleep = 10000; - (void)testPThreadName { NSString *testName = @"InigoMontoya"; [workerThread_ setName:testName]; - [workerThread_ gtm_performWaitingUntilDone:NO block:^{ + [workerThread_ gtm_performWaitingUntilDone:YES block:^{ XCTAssertEqualObjects([workerThread_ name], testName); char threadName[100]; pthread_getname_np(pthread_self(), threadName, 100); -- cgit v1.2.3