Skip to content
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

A single weird flaky failure in dispatch store action test #246

Closed
bahmutov opened this issue Mar 19, 2019 · 1 comment · Fixed by #247
Closed

A single weird flaky failure in dispatch store action test #246

bahmutov opened this issue Mar 19, 2019 · 1 comment · Fixed by #247
Assignees
Labels

Comments

@bahmutov
Copy link
Contributor

bahmutov commented Mar 19, 2019

I have noticed an interesting our of order issue sometimes failing test on CI

Test "examples/blogs__e2e-snapshots/cypress/screenshots/store-spec.js/"

Screen Shot 2019-03-19 at 3 48 38 PM

https://circleci.com/gh/cypress-io/cypress-test-example-repos/20843

Notice the switched order in the failed test:

resetting database
POST /reset 200 0.842 ms - -
POST /todos 201 3.096 ms - 62
GET /todos 200 2.684 ms - 76
    1) changes the state after delay

So the initial GET /todos takes a long time - and it overwrites our POST /todos with the new item.

@bahmutov bahmutov self-assigned this Mar 19, 2019
@bahmutov bahmutov added the bug label Mar 19, 2019
@bahmutov bahmutov changed the title Sometimes dispatching action can happen Sometimes dispatching action can happen BEFORE initial load Mar 19, 2019
@bahmutov bahmutov changed the title Sometimes dispatching action can happen BEFORE initial load A single weird flaky failure in dispatch store action test Mar 19, 2019
@bahmutov
Copy link
Contributor Author

Root cause: Vuex was taking its time updating its state, thus the snapshot was incorrectly empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant