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

Flaky test: GameStoreTest#GIVEN_created_WHEN_first_click_on_cell_THEN_state_started #22

Open
arkivanov opened this issue Mar 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@arkivanov
Copy link
Owner

arkivanov commented Mar 25, 2024

The test sometimes fails because the game state may become WIN after the first click, but the test expects STARTED. We should also check other tests. Best to check is to run a test in repeat(1000) { ... }.

@arkivanov
Copy link
Owner Author

One of the possible ways of fixing the test is to create GameState with a predefined grid, such that clicking on the cell always leads to STARTED. Plus we could also precisely verify the entire grid state.

And we can also add a separate test for the case when clicking on the cell first time makes the state WIN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant