mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-23 20:31:13 +08:00
Fix crashes during test suite execution due to delay during processing of NSManagedObjectContextDidSaveNotification
This commit is contained in:
@@ -261,6 +261,7 @@ static RKManagedObjectStore *defaultStore = nil;
|
||||
{
|
||||
RKLogDebug(@"primaryManagedObjectContext was saved: merging changes to mainQueueManagedObjectContext");
|
||||
RKLogTrace(@"Merging changes detailed in userInfo dictionary: %@", [notification userInfo]);
|
||||
NSAssert([notification object] == self.primaryManagedObjectContext, @"Received Managed Object Context Did Save Notification for Unexpected Context: %@", [notification object]);
|
||||
[self.mainQueueManagedObjectContext performBlock:^{
|
||||
[self.mainQueueManagedObjectContext mergeChangesFromContextDidSaveNotification:notification];
|
||||
}];
|
||||
|
||||
Reference in New Issue
Block a user