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

Fix flaky e2e test with nondeterministic project list order #5215

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

adamchalmers
Copy link
Collaborator

@adamchalmers adamchalmers commented Feb 2, 2025

The test "Opening a project should successfully load the stream" creates two projects. Then it queries the projects, checking both projects were created. However, the projects are returned in a nondeterministic order, which means the test flakes.

I think the nondeterminism is because they're created with a Promise.all, so I've instead changed it to create the projects in a specific order.

I've also queried the projects in an order-insensitive way.

Copy link

qa-wolf bot commented Feb 2, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

Copy link

vercel bot commented Feb 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Feb 2, 2025 8:13pm

Copy link
Collaborator

@jtran jtran left a comment

Choose a reason for hiding this comment

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

I almost made this same PR to start the process of upgrading yarn. corepack enable makes this change.

I think creating them in Promise.all was introducing nondeterminism and
making tests flaky.
@adamchalmers adamchalmers force-pushed the achalmers/test-main-e2e branch from 287d8e2 to ebf8c0a Compare February 2, 2025 20:00
@adamchalmers adamchalmers changed the title Fix main e2e Fix flaky e2e test with nondeterministic project list order Feb 2, 2025
Copy link

codecov bot commented Feb 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.95%. Comparing base (2294331) to head (ebf8c0a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5215   +/-   ##
=======================================
  Coverage   85.95%   85.95%           
=======================================
  Files          90       90           
  Lines       32906    32912    +6     
=======================================
+ Hits        28285    28291    +6     
  Misses       4621     4621           
Flag Coverage Δ
wasm-lib 85.95% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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