iOS: Fix flaky tests (remove timeouts) (flutter/engine#55961)

When run repeatedly, some of the iOS unit tests can relatively easily
blow their test timeouts. Since we're testing behaviour and not
performance in these tests there's no need to enforce a particular
timeout.

The bots will fail if the tests timeout, regardless.
This commit is contained in:
Chris Bracken
2024-10-18 16:22:11 -07:00
committed by GitHub
parent 298fba8a45
commit 3031222ef2

View File

@@ -249,7 +249,7 @@ FLUTTER_ASSERT_ARC
[timeoutFirstFrame fulfill];
}
}];
[self waitForExpectationsWithTimeout:5 handler:nil];
[self waitForExpectations:@[ timeoutFirstFrame ]];
}
- (void)testSpawn {
@@ -275,7 +275,7 @@ FLUTTER_ASSERT_ARC
[deallocNotification fulfill];
}];
}
[self waitForExpectationsWithTimeout:1 handler:nil];
[self waitForExpectations:@[ deallocNotification ]];
[center removeObserver:observer];
}
@@ -299,7 +299,7 @@ FLUTTER_ASSERT_ARC
[gotMessage fulfill];
}];
});
[self waitForExpectationsWithTimeout:1 handler:nil];
[self waitForExpectations:@[ gotMessage ]];
}
- (void)testThreadPrioritySetCorrectly {
@@ -325,7 +325,7 @@ FLUTTER_ASSERT_ARC
FlutterEngine* engine = [[FlutterEngine alloc] init];
[engine run];
[self waitForExpectationsWithTimeout:1 handler:nil];
[self waitForExpectations:@[ prioritiesSet ]];
method_setImplementation(method, originalSetThreadPriority);
}