aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar dmaclach <dmaclach@gmail.com>2018-11-15 11:22:52 -0800
committerGravatar GitHub <noreply@github.com>2018-11-15 11:22:52 -0800
commitec7da23dcde0f262ec038dd64a9aefa69b8a2cc4 (patch)
treeacd4cf88cd3032017d628214979bb4ae6faff3d0
parent555c434a7d64ad7de9907bb0f0baf8f6cca685f9 (diff)
Fix up race in testPThreadName. (#211)
The block must execute before the test completes.
-rw-r--r--Foundation/GTMNSThread+BlocksTest.m2
1 files changed, 1 insertions, 1 deletions
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);