-
Notifications
You must be signed in to change notification settings - Fork 28
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
test: fix flaky test #630
test: fix flaky test #630
Conversation
Looks it generates other problem 🤯 let me check it. |
@@ -492,5 +463,35 @@ describe('Request Queue methods', () => { | |||
expect(browserRes.items).toEqual(browserRequests); | |||
validateRequest({ limit: maxPageLimit }, { queueId }); | |||
}); | |||
|
|||
// NOTE: This test needs to be last otherwise it will break other tests |
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.
it would be much better to remove the "dependency", tests should be ideally isolated. isn't it enough to use a different queue ID?
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.
@B4nan The problem is how the mock server is written
Checking request from mock server is done very basic using pop() method from list, see
https://github.com/apify/apify-client-js/blob/master/test/mock_server/server.js#L48
so changing ID does not help.
btw the |
shall we merge this or why did you keep it as a draft? |
let's merge this, seems like a good enough fix. |
Fix flaky tests by changing the order of test executions 😄