Skip to content

Commit 2fa75f4

Browse files
committed
increase test timeout and style
1 parent 299bcec commit 2fa75f4

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

FirebaseDatabase/Tests/Helpers/FTestContants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
#define Firebase_FTestContants_h
1919

2020
#define kFirebaseTestTimeout 7
21-
#define kFirebaseTestWaitUntilTimeout 5
21+
#define kFirebaseTestWaitUntilTimeout 10
2222

2323
#endif

FirebaseDatabase/Tests/Integration/FEventTests.m

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -362,26 +362,25 @@ - (void)testOnceValueFiresExactlyOnce {
362362
}
363363

364364
- (void)testOnceChildAddedFiresExactlyOnce {
365-
for(int i = 0; i < 100; i++) {
366-
365+
for (int i = 0; i < 100; i++) {
367366
FIRDatabaseReference* path = [FTestHelpers getRandomNode];
368367
__block BOOL firstCall = YES;
369368

370369
__block BOOL done = NO;
371370

372371
[path observeSingleEventOfType:FIRDataEventTypeChildAdded
373372
withBlock:^(FIRDataSnapshot* snapshot) {
374-
XCTAssertTrue(firstCall, @"Properly saw first call");
375-
firstCall = NO;
376-
XCTAssertEqualObjects(@42, [snapshot value], @"Properly saw node value");
377-
XCTAssertEqualObjects(@"foo", [snapshot key],
378-
@"Properly saw the first node");
379-
if (![[snapshot value] isEqual:@42]) {
380-
exit(-1);
381-
}
382-
383-
done = YES;
384-
}];
373+
XCTAssertTrue(firstCall, @"Properly saw first call");
374+
firstCall = NO;
375+
XCTAssertEqualObjects(@42, [snapshot value], @"Properly saw node value");
376+
XCTAssertEqualObjects(@"foo", [snapshot key],
377+
@"Properly saw the first node");
378+
if (![[snapshot value] isEqual:@42]) {
379+
exit(-1);
380+
}
381+
382+
done = YES;
383+
}];
385384

386385
[[path child:@"foo"] setValue:@42];
387386
[[path child:@"bar"] setValue:@84]; // XXX FIXME sometimes this event fires first

0 commit comments

Comments
 (0)