Skip to content

fix: remove flaking test #3207

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

Merged
merged 1 commit into from
Jul 26, 2022
Merged

Conversation

Kira-Pilot
Copy link
Member

@Kira-Pilot Kira-Pilot commented Jul 26, 2022

This test is flaking and is holding up PRs. It also errors locally on main when run locally. I don't know why it's flaky in CI and sometimes passes.
Either way, I spend some time looking into it and think we should just take it out for now.
Screen Shot 2022-07-26 at 10 17 54 AM

Log description:

  ● Users Page › suspend user › when it is success › shows a success message and refresh the page

    expect(jest.fn()).toBeCalledTimes(expected)

    Expected number of calls: 1
    Received number of calls: 2

      195 |
      196 |         // Check if the users list was reload
    > 197 |         await waitFor(() => expect(API.getUsers).toBeCalledTimes(1))
          |                                                  ^
      198 |       })
      199 |     })
      200 |

@Kira-Pilot Kira-Pilot requested a review from a team as a code owner July 26, 2022 14:20
Copy link
Contributor

@presleyp presleyp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reasonable choice! Can you post the output (like why it fails) in the PR for posterity?

@Kira-Pilot
Copy link
Member Author

@presleyp sure! description updated

@presleyp
Copy link
Contributor

Don't worry if it's too much of a time sink, but would it work to just remove the check for it being called exactly once?

@Kira-Pilot Kira-Pilot merged commit ef260fa into main Jul 26, 2022
@Kira-Pilot Kira-Pilot deleted the remove-flaking-user-test/kira-pilot branch July 26, 2022 14:35
@Kira-Pilot
Copy link
Member Author

Kira-Pilot commented Jul 26, 2022

@presleyp sorry, hit the trigger before I saw the comment. We could do that, but it being called twice actually might point to a bug. I think a better idea is to make a ticket to investigate more later so I'll add one.

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

Successfully merging this pull request may close these issues.

2 participants