[Bugfix:Testing] up office hours verifyWebsocket time#12994
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
@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 Hope this helps! Let me know if you run into anything else. |
|
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
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? |
|
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. |
GarvitKhandelwal31
left a comment
There was a problem hiding this comment.
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.


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:
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?
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.