-
Notifications
You must be signed in to change notification settings - Fork 945
Fix Saucelabs tests for Firestore unit tests except IE #3095
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
Conversation
Binary Size ReportAffected SDKs
Test Logs
|
@@ -143,7 +143,8 @@ describe('AsyncQueue', () => { | |||
const doStep = (n: number): Promise<number> => | |||
defer(() => completedSteps.push(n)); | |||
queue.enqueueAndForget(() => doStep(1)); | |||
const last = queue.enqueueAfterDelay(timerId1, 5, () => doStep(4)); | |||
// Flaky on Safari, increasing delay to 1000ms to try to increase reliability. | |||
const last = queue.enqueueAfterDelay(timerId1, 1000, () => doStep(4)); |
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.
This is too long - we cannot wait a full second for a single test. Can we skip this test in Safari?
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.
Sure, adding a check.
6d6cb21
to
a288e8c
Compare
@@ -272,11 +273,11 @@ export class TestPlatform implements Platform { | |||
} | |||
} | |||
|
|||
/** Returns true if we are running under Node. */ | |||
export function isNode(): boolean { |
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.
Seems like this wasn't being used anywhere, and there's a better version in @firebase/util so I hope it's okay to remove?
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.
@wu-hui might have just started using this. He would probably be delighted to switch to the better version :)
@@ -137,7 +138,9 @@ describe('AsyncQueue', () => { | |||
}); | |||
}); | |||
|
|||
it('can schedule ops in the future', async () => { | |||
// Flaky on Safari. |
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 know why it is flaky on Safari?
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.
I haven't been able to find any reason. The test relies on two setTimeouts at 1ms and 5ms happening in the correct order, and sometimes Safari doesn't seem to get the order right. I can't find any known bug or issue that might cause that.
Fix 1 error in Firefox + Safari and 2 errors in Safari only.
IE is excluded, to be fixed in a future PR, because:
TODO: Next step is to try to run
integration/firestore
tests instead of integration tests inpackage/firestore
. It is almost ready to run, but has 1 error common across all browsers, 1 exclusive to Firefox, and 12/13 in IE (memory/persistence).