-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix flaky tests #784
Fix flaky tests #784
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,19 +121,18 @@ class AnalyticsTests: QuickSpec { | |
let integration = analytics.test_integrationsManager()?.test_segmentIntegration() | ||
expect(integration).notTo(beNil()) | ||
|
||
var sent = 0 | ||
|
||
analytics.flush() | ||
integration?.test_dispatchBackground { | ||
if let count = integration?.test_queue()?.count { | ||
sent = count | ||
} | ||
else { | ||
sent = -1 | ||
waitUntil(timeout: 60) {done in | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this the timeout to check for the messages in webhook? if so, you may want to increase it to 3 minutes as 1 minute is sometimes not enough to find them in webhook (3 mins is what library-e2e-tester currently does). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It isn't this one, but I pushed a new commit to increase the webhook timeout to 3 minutes - thanks! |
||
let queue = DispatchQueue(label: "test") | ||
|
||
queue.async { | ||
while(integration?.test_queue()?.count != max) { | ||
sleep(1) | ||
} | ||
|
||
done() | ||
} | ||
} | ||
|
||
expect(sent).toEventually(equal(max)) | ||
} | ||
|
||
it("protocol conformance should not interfere with UIApplication interface") { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I added
xcrun simctl list
we've miraculously never had the error again. If I remove it we get the missing simulator error sporadically. This could also help us debug it next time.