Permalink
Browse files

changing to a private queue for the unit test and using -waitForQueue…

…ToFinish
  • Loading branch information...
Machx committed Feb 27, 2012
1 parent 4c9cd38 commit 9a379313bf2da1ba3c1c1b603c50e0f29d3a451b
Showing with 2 additions and 2 deletions.
  1. +2 −2 Source/CWBlockQueueTests.m
@@ -16,15 +16,15 @@ -(void)testBasicOperation
{
__block NSString *result = nil;
- CWBlockQueue *queue = [[CWBlockQueue alloc] initWithQueueType:kCWBlockQueueTargetGCDNormalPriority
+ CWBlockQueue *queue = [[CWBlockQueue alloc] initWithQueueType:kCWBlockQueueTargetPrivateQueue
concurrent:YES
label:nil];
[queue addoperationWithBlock:^{
result = @"Hello World!";
}];
- [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:1]];
+ [queue waitForQueueToFinish];
CWAssertEqualsStrings(@"Hello World!", result);
}

0 comments on commit 9a37931

Please sign in to comment.