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

list: attempt to fix flaky unit test #4288

Merged
merged 1 commit into from
Dec 11, 2023
Merged

list: attempt to fix flaky unit test #4288

merged 1 commit into from
Dec 11, 2023

Conversation

margaree
Copy link
Contributor

@margaree margaree commented Dec 8, 2023

The list tests that involve batching are flaking, mostly (maybe only) on Safari and Firefox.

For the test that I'm seeing flake most often, it's expecting the batch of events to contain 3 events but more often it's 2 and sometimes 1. The biggest source of causing 2 events instead of 3 is that this event is firing too late and though it happens, the d2l-list-selection-changes event will have already fired without it.

To me, this isn't necessarily wrong behaviour just not ideal. I've increase the setTimeout time that we wait before triggering the batch event. Let me know if the 30 was an important value. I've also got changes to the test working where we wait for selection to have been included in a d2l-list-selection-changes event depending on how many events are in, but that code is super verbose.

I'll run this a bunch of times to see if this change helps here. 5 times and so far so good

Copy link
Contributor

github-actions bot commented Dec 8, 2023

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-4288/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

@margaree margaree marked this pull request as ready for review December 8, 2023 14:55
@margaree margaree requested a review from a team as a code owner December 8, 2023 14:55
@margaree margaree merged commit a9539a0 into main Dec 11, 2023
5 checks passed
@margaree margaree deleted the list-flaky-tests branch December 11, 2023 18:38
Copy link

🎉 This PR is included in version 2.167.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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 this pull request may close these issues.

2 participants