Skip to content

[Bugfix:Testing] up office hours verifyWebsocket time#12994

Merged
bmcutler merged 4 commits into
mainfrom
fix-office-hours-queue
Jul 5, 2026
Merged

[Bugfix:Testing] up office hours verifyWebsocket time#12994
bmcutler merged 4 commits into
mainfrom
fix-office-hours-queue

Conversation

@roye2

@roye2 roye2 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Why is this Change Important & Necessary?

The office_hours_queue spec was flaky because it would often fail to connect to the websocket in the default amount of time.
For example:
image

What is the New Behavior?

I tested the office hours queue and the spec and determined that the websocket was consistently being connected to, it was just slow. This PR makes the spec use a timer of 50000 ms instead of the default 10000 ms for verifyWebSocketStatus, which should be enough for it to now pass consistently.

What steps should a reviewer take to reproduce or test the bug or new feature?

  • Run the spec locally on main and observe the flakiness
  • Run the spec on the branch and ensure it passes.
  • Observe the spec passing in CI on github.

Automated Testing & Documentation

Other information

I know that in some cases the failure to connect to the websocket is a result of some underlying bug. In this case, I tested the feature and ran the spec a bunch of times, observing the output, but could not find any other issues with the spec or issues with the office hours queue feature in general. When reviewing, please do the same just in case there is something I missed.

@github-project-automation github-project-automation Bot moved this to Seeking Reviewer in Submitty Development Jul 1, 2026
@roye2 roye2 changed the title [Bugfix:Testing] increase office hours verifyWebsocket time [Bugfix:Testing] up office hours verifyWebsocket time Jul 1, 2026
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.41%. Comparing base (4821494) to head (36a8c15).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main   #12994   +/-   ##
=========================================
  Coverage     21.41%   21.41%           
  Complexity    10002    10002           
=========================================
  Files           277      277           
  Lines         37420    37420           
  Branches        512      512           
=========================================
  Hits           8014     8014           
  Misses        28905    28905           
  Partials        501      501           
Flag Coverage Δ
autograder 21.16% <ø> (ø)
js 1.98% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.37% <ø> (ø)
python_submitty_utils 79.83% <ø> (ø)
submitty_daemon_jobs 91.13% <ø> (ø)
vue 100.00% <ø> (ø)

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jndlansh

jndlansh commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

@roye2 I did try to run the office_hours_queue spec locally, I am not sure if i did it right. Would you please tell me how to do that?

@roye2

roye2 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

@roye2 I did try to run the office_hours_queue spec locally, I am not sure if i did it right. Would you please tell me how to do that?

@jndlansh , the way to run the office hours queue spec is with your local installation of Cypress. You can run it in headless mode from local site/ by doing npx cypress run --spec cypress/e2e/Cypress-Feature/office_hours_queue.spec.js. Alternatively, you can use the Cypress gui by running npx cypress open in the site directory, and then choose e2e, the browser of your choosing (or electron) and then search for the spec and run it.
More information can be found here: https://submitty.org/developer/testing/cypress

Hope this helps! Let me know if you run into anything else.

@jndlansh

jndlansh commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Thank you @roye2 Most probably i am still missing a piece here, coz, all the e2e tests fail on my local in this manner

Clearly it passes on CI

I did exactly that for testing, but the test failed : both on main and branch

Screenshot 2026-07-03 190924

Rest all the tests were skipped. I am not sure why this is happening, I can't see this link to your code change

@roye2

roye2 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Thank you @roye2 Most probably i am still missing a piece here, coz, all the e2e tests fail on my local in this manner

Clearly it passes on CI

I did exactly that for testing, but the test failed : both on main and branch
Screenshot 2026-07-03 190924

Rest all the tests were skipped. I am not sure why this is happening, I can't see this link to your code change

Which browser are you using for the CI? I have noticed that firefox doesn't work at all for me so I use Electron. Maybe try that?

@jndlansh

jndlansh commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

I tried both Chrome and Electron. Do I need to install some dependencies?

@GarvitKhandelwal31
GarvitKhandelwal31 self-requested a review July 4, 2026 09:16
@automateprojectmangement automateprojectmangement Bot moved this from Seeking Reviewer to In Review in Submitty Development Jul 4, 2026
@GarvitKhandelwal31

Copy link
Copy Markdown
Contributor

I tried both Chrome and Electron. Do I need to install some dependencies?

You need to recreate the sample courses, from your error I can tell that much.
Would you mind sharing the full error screen if this does not get resolved.

@GarvitKhandelwal31 GarvitKhandelwal31 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am personally not sure what is the reason of flakiness. But I have run the cypress test a few times on this PR, and I think so it probably solves the correct root cause.

@github-project-automation github-project-automation Bot moved this from In Review to Awaiting Maintainer Review in Submitty Development Jul 4, 2026
@GarvitKhandelwal31 GarvitKhandelwal31 moved this from Awaiting Maintainer Review to Ready to Merge in Submitty Development Jul 4, 2026
@bmcutler
bmcutler merged commit 08d63ca into main Jul 5, 2026
53 checks passed
@bmcutler
bmcutler deleted the fix-office-hours-queue branch July 5, 2026 12:49
@github-project-automation github-project-automation Bot moved this from Ready to Merge to Done in Submitty Development Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants