aboutsummaryrefslogtreecommitdiffhomepage
path: root/Example/Database
diff options
context:
space:
mode:
authorGravatar Sebastian Schmidt <mrschmidt@google.com>2018-02-12 19:11:45 -0800
committerGravatar Sebastian Schmidt <mrschmidt@google.com>2018-02-13 10:27:53 -0800
commit12faf205f34042aa7fb6ff13c6980556dbb1ba39 (patch)
tree4f6300167f06b0cb68fb5c5fb3274293df62bb91 /Example/Database
parentadf9fb31eeef639ef23b2ff22a71adaa91a263b7 (diff)
Cleaning up implicit retain for the RTDB and Storage
Diffstat (limited to 'Example/Database')
-rw-r--r--Example/Database/Tests/Integration/FData.m6
-rw-r--r--Example/Database/Tests/Integration/FRealtime.m1
-rw-r--r--Example/Database/Tests/Unit/FSyncPointTests.m6
3 files changed, 9 insertions, 4 deletions
diff --git a/Example/Database/Tests/Integration/FData.m b/Example/Database/Tests/Integration/FData.m
index aef15e1..d036f77 100644
--- a/Example/Database/Tests/Integration/FData.m
+++ b/Example/Database/Tests/Integration/FData.m
@@ -487,7 +487,7 @@
[[ref child:@"100003354884401"] setValue:@"alpha"];
__block BOOL ready = NO;
- [ref observeEventType:FIRDataEventTypeValue withBlock:^(FIRDataSnapshot *snapshot) {
+ [ref observeSingleEventOfType:FIRDataEventTypeValue withBlock:^(FIRDataSnapshot *snapshot) {
id val = [snapshot value];
XCTAssertTrue([val isKindOfClass:[NSDictionary class]], @"Expected a dictionary.");
ready = YES;
@@ -678,6 +678,8 @@
[self waitUntil:^BOOL{
return setDone && calls == 1;
}];
+
+ [node removeAllObservers];
}
- (void) testHasChildrenWorksCorrectly {
@@ -878,6 +880,7 @@
[self waitUntil:^BOOL{
return calls == 1;
}];
+ [reader removeAllObservers];
}
- (void) testSetPriorityOnNonexistentNodeFails {
@@ -2208,6 +2211,7 @@
}];
WAIT_FOR(done);
+ [deleter removeAllObservers];
}
- (void) testParentDeleteShadowsChildListenersWithNonDefaultQuery {
diff --git a/Example/Database/Tests/Integration/FRealtime.m b/Example/Database/Tests/Integration/FRealtime.m
index 5c7d186..5acda07 100644
--- a/Example/Database/Tests/Integration/FRealtime.m
+++ b/Example/Database/Tests/Integration/FRealtime.m
@@ -481,6 +481,7 @@
WAIT_FOR(count == 2);
// cleanup
+ [reader removeAllObservers];
[FRepoManager disposeRepos:writerCfg];
}
diff --git a/Example/Database/Tests/Unit/FSyncPointTests.m b/Example/Database/Tests/Unit/FSyncPointTests.m
index 797a5aa..de4680f 100644
--- a/Example/Database/Tests/Unit/FSyncPointTests.m
+++ b/Example/Database/Tests/Unit/FSyncPointTests.m
@@ -86,15 +86,15 @@ typedef NSDictionary* (^fbt_nsdictionary_void)(void);
}
- (void) fireEvent:(id<FEvent>)event queue:(dispatch_queue_t)queue {
- [NSException raise:@"NotImplementedError" format:@"Method not implemneted."];
+ [NSException raise:@"NotImplementedError" format:@"Method not implemented."];
}
- (FCancelEvent *) createCancelEventFromError:(NSError *)error path:(FPath *)path {
- [NSException raise:@"NotImplementedError" format:@"Method not implemneted."];
+ [NSException raise:@"NotImplementedError" format:@"Method not implemented."];
return nil;
}
- (FIRDatabaseHandle) handle {
- [NSException raise:@"NotImplementedError" format:@"Method not implemneted."];
+ [NSException raise:@"NotImplementedError" format:@"Method not implemented."];
return 0;
}
@end