Repository navigation
test(recording): stop reading the player's progress bar too early - #26088
ramonlsouza merged 1 commit into
Conversation
"Recording > Player > Play/Pause" failed in CI with "progress bar width should not change when playback is paused" (439 px, then 447 px), on the first attempt and on the retry. The player repaints the play progress from its time updates, so the bar is still catching up for a few frames after the state it reflects has changed. Sampling the page right after a pause was acknowledged showed the media element paused with a constant currentTime while the bar grew by 5 px some 40 ms later, in 2 of 6 runs. The test took its reference width in that window whenever the runner was slow enough. Play/Pause: check the pause on the media element itself (paused, and currentTime unchanged after the wait), and take the reference width only once two consecutive readings agree. A playback that keeps running still fails: on the paused flag, on currentTime, or because the width never settles. Seek forward and backward: the same lag behind a fixed 500 ms sleep. A local run read 7.85% (the position before the seek) while the player already showed 0:00 remaining. Poll for the expected width instead. (cherry picked from commit 4c86761)
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe recording Playwright tests now check that playback time and progress-bar width remain unchanged while paused. The tests also poll for the expected progress-bar state after forward and backward seeks. A selector for the video.js media element supports the pause check. Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to
|
✅ Automated tests have passed! |
…s unique The suite had 162 waitForTimeout calls in 40 files. A fixed sleep is too long on a quiet server and can still be too short under CI load, so each one was looked at: 46 now wait for what they were standing in for, and the 116 left are either the duration the test is about (an observation window for something that must not happen, a debounce, a sampling or recording interval, reproduction pacing), or wait for server-side state that the page does not show (a guest policy reaching bbb-web, notes or annotations stored before an export). A few of the kept ones have no stated purpose and are listed in the PR evidence rather than guessed at. Some conversions were undone after they failed a repeated run, and the pauses stay: the one between two rotate clicks also lets the server echo of the first rotation arrive before the second (otherwise the echo can overwrite it), the one before typing in the slide-change-while-editing test is part of that reproduction's timing, and the one before the layout screenshots that include the whiteboard lets the camera fit the slide that has just been shown (under CI timing the screenshot otherwise caught a stale zoom). None of these is visible on the page. The largest savings: - Smart Slides polls slept 5 s after the upload and again before opening the quick poll. What the quick poll needs is the presenter's toolbar to show the target slide: the slide selector and the quick-poll button are rendered from the same current-slide prop, so goToSlide() waits for the selector to show that slide. This also covers the stale-question race the 3 s wait in the typed-response test was guarding against. - The camera re-sync tests slept 5 s after mount, after the shrink and after the expand. A probe of the camera, wrapper and slide sizes showed the camera re-fits about 0.9 s after a resize, and that the slide spans #presentationInnerWrapper exactly when the camera fits it (twice that when zoomed 2x, 1.5 times at 150%). waitForSlideScale() waits for that ratio in a wrapper of the new size and does not fail itself, so a camera that never re-syncs is still reported by the existing checks. The wait after restoring the minimized presentation is kept: the probe showed the restore passes through the fit zoom before the cached zoom comes back, so a poll there could pass before the regression shows. The mount waits also wait for the presentation layout through waitForPresentationLayout(), a local helper of whiteboardResize.ts that waits until the toolbar's height is reserved, because the viewer's wrapper width is compared for exact equality. The zoomed visual test now closes the toasts before its first screenshot, as its sibling already did: the 8 s of sleeps were what let the "left the audio conference" toast disappear before that screenshot. - The late joiner of the external video test waited 10 s before looking for the video; it now waits up to the same total for the video itself. - The learning dashboard reloaded after 10 s to see the meeting duration grow; it now reloads every second until it has. - The clock-skew recording test waited 5 s for the RTT worker; it now waits for the /rtt-check response itself. - Shared helpers: the presentation manager's list is waited for (the thumbnail of the shown or minimized presentation) instead of 500 ms in each upload, and the breakout panel waits for the attendee and the first room instead of 2 s before every breakout test drags the attendee. - Some waits before screenshot comparisons now rely on prepareForScreenshot and the stable-frame check of toHaveScreenshot, which compares the first stable frame and does not retry after it, so each waits for what the frame needs first: the exported-presentation screenshots wait for the whiteboard to swap in the new slide (it does so only once the image is decoded), the cameras-only layout waits for both webcams, and the participants-and-chat layout has no presentation to settle. The screenshot of two freshly joined breakout rooms keeps its wait, since nothing marks the first slide of a fresh join as painted. The recording tests' progress-bar waits were already polls on this branch (bigbluebutton#26088), so that part is left as it is. The external video late-joiner wait goes from a fixed ELEMENT_WAIT_LONGER_TIME to waiting for the attendee's video frame, within the same YouTube-based helpers the branch has today. Six leaf titles repeated within a spec file, so -g and title-based lists could not tell the tests apart. They now say what differs: the breakout duration change in the creation form or of running rooms, the unified layout minimize for a moderator without or in audio, and the four layout tests named after the parameter they use (meetingLayout= or enforceLayout=). No workflow, README, sdk-flaky-tests.txt or snapshot name refers to the old titles; the four layout tests keep their quarantine tag and issue link.
…s unique The suite had 162 waitForTimeout calls in 40 files. A fixed sleep is too long on a quiet server and can still be too short under CI load, so each one was looked at: 46 now wait for what they were standing in for, and the 116 left are either the duration the test is about (an observation window for something that must not happen, a debounce, a sampling or recording interval, reproduction pacing), or wait for server-side state that the page does not show (a guest policy reaching bbb-web, notes or annotations stored before an export). A few of the kept ones have no stated purpose and are listed in the PR evidence rather than guessed at. Some conversions were undone after they failed a repeated run, and the pauses stay: the one between two rotate clicks also lets the server echo of the first rotation arrive before the second (otherwise the echo can overwrite it), the one before typing in the slide-change-while-editing test is part of that reproduction's timing, and the one before the layout screenshots that include the whiteboard lets the camera fit the slide that has just been shown (under CI timing the screenshot otherwise caught a stale zoom). None of these is visible on the page. The largest savings: - Smart Slides polls slept 5 s after the upload and again before opening the quick poll. What the quick poll needs is the presenter's toolbar to show the target slide: the slide selector and the quick-poll button are rendered from the same current-slide prop, so goToSlide() waits for the selector to show that slide. This also covers the stale-question race the 3 s wait in the typed-response test was guarding against. - The camera re-sync tests slept 5 s after mount, after the shrink and after the expand. A probe of the camera, wrapper and slide sizes showed the camera re-fits about 0.9 s after a resize, and that the slide spans #presentationInnerWrapper exactly when the camera fits it (twice that when zoomed 2x, 1.5 times at 150%). waitForSlideScale() waits for that ratio in a wrapper of the new size and does not fail itself, so a camera that never re-syncs is still reported by the existing checks. The wait after restoring the minimized presentation is kept: the probe showed the restore passes through the fit zoom before the cached zoom comes back, so a poll there could pass before the regression shows. The mount waits also wait for the presentation layout through waitForPresentationLayout(), a local helper of whiteboardResize.ts that waits until the toolbar's height is reserved, because the viewer's wrapper width is compared for exact equality. The zoomed visual test now closes the toasts before its first screenshot, as its sibling already did: the 8 s of sleeps were what let the "left the audio conference" toast disappear before that screenshot. - The late joiner of the external video test waited 10 s before looking for the video; it now waits up to the same total for the video itself. - The learning dashboard reloaded after 10 s to see the meeting duration grow; it now reloads every second until it has. - The clock-skew recording test waited 5 s for the RTT worker; it now waits for the /rtt-check response itself. - Shared helpers: the presentation manager's list is waited for (the thumbnail of the shown or minimized presentation) instead of 500 ms in each upload, and the breakout panel waits for the attendee and the first room instead of 2 s before every breakout test drags the attendee. - Some waits before screenshot comparisons now rely on prepareForScreenshot and the stable-frame check of toHaveScreenshot, which compares the first stable frame and does not retry after it, so each waits for what the frame needs first: the exported-presentation screenshots wait for the whiteboard to swap in the new slide (it does so only once the image is decoded), the cameras-only layout waits for both webcams, and the participants-and-chat layout has no presentation to settle. The screenshot of two freshly joined breakout rooms keeps its wait, since nothing marks the first slide of a fresh join as painted. The recording tests' progress-bar waits were already polls on this branch (bigbluebutton#26088), so that part is left as it is. The external video late-joiner wait goes from a fixed ELEMENT_WAIT_LONGER_TIME to waiting for the attendee's video frame, within the same YouTube-based helpers the branch has today. Six leaf titles repeated within a spec file, so -g and title-based lists could not tell the tests apart. They now say what differs: the breakout duration change in the creation form or of running rooms, the unified layout minimize for a moderator without or in audio, and the four layout tests named after the parameter they use (meetingLayout= or enforceLayout=). No workflow, README, sdk-flaky-tests.txt or snapshot name refers to the old titles; the four layout tests keep their quarantine tag and issue link.
…s unique The suite had 162 waitForTimeout calls in 40 files. A fixed sleep is too long on a quiet server and can still be too short under CI load, so each one was looked at: 46 now wait for what they were standing in for, and the 116 left are either the duration the test is about (an observation window for something that must not happen, a debounce, a sampling or recording interval, reproduction pacing), or wait for server-side state that the page does not show (a guest policy reaching bbb-web, notes or annotations stored before an export). A few of the kept ones have no stated purpose and are listed in the PR evidence rather than guessed at. Some conversions were undone after they failed a repeated run, and the pauses stay: the one between two rotate clicks also lets the server echo of the first rotation arrive before the second (otherwise the echo can overwrite it), the one before typing in the slide-change-while-editing test is part of that reproduction's timing, and the one before the layout screenshots that include the whiteboard lets the camera fit the slide that has just been shown (under CI timing the screenshot otherwise caught a stale zoom). None of these is visible on the page. The largest savings: - Smart Slides polls slept 5 s after the upload and again before opening the quick poll. What the quick poll needs is the presenter's toolbar to show the target slide: the slide selector and the quick-poll button are rendered from the same current-slide prop, so goToSlide() waits for the selector to show that slide. This also covers the stale-question race the 3 s wait in the typed-response test was guarding against. - The camera re-sync tests slept 5 s after mount, after the shrink and after the expand. A probe of the camera, wrapper and slide sizes showed the camera re-fits about 0.9 s after a resize, and that the slide spans #presentationInnerWrapper exactly when the camera fits it (twice that when zoomed 2x, 1.5 times at 150%). waitForSlideScale() waits for that ratio in a wrapper of the new size and does not fail itself, so a camera that never re-syncs is still reported by the existing checks. The wait after restoring the minimized presentation is kept: the probe showed the restore passes through the fit zoom before the cached zoom comes back, so a poll there could pass before the regression shows. The mount waits also wait for the presentation layout through waitForPresentationLayout(), a local helper of whiteboardResize.ts that waits until the toolbar's height is reserved, because the viewer's wrapper width is compared for exact equality. The zoomed visual test now closes the toasts before its first screenshot, as its sibling already did: the 8 s of sleeps were what let the "left the audio conference" toast disappear before that screenshot. - The late joiner of the external video test waited 10 s before looking for the video; it now waits up to the same total for the video itself. - The learning dashboard reloaded after 10 s to see the meeting duration grow; it now reloads every second until it has. - The clock-skew recording test waited 5 s for the RTT worker; it now waits for the /rtt-check response itself. - Shared helpers: the presentation manager's list is waited for (the thumbnail of the shown or minimized presentation) instead of 500 ms in each upload, and the breakout panel waits for the attendee and the first room instead of 2 s before every breakout test drags the attendee. - Some waits before screenshot comparisons now rely on prepareForScreenshot and the stable-frame check of toHaveScreenshot, which compares the first stable frame and does not retry after it, so each waits for what the frame needs first: the exported-presentation screenshots wait for the whiteboard to swap in the new slide (it does so only once the image is decoded), the cameras-only layout waits for both webcams, and the participants-and-chat layout has no presentation to settle. The screenshot of two freshly joined breakout rooms keeps its wait, since nothing marks the first slide of a fresh join as painted. The recording tests' progress-bar waits were already polls on this branch (bigbluebutton#26088), so that part is left as it is. The external video late-joiner wait goes from a fixed ELEMENT_WAIT_LONGER_TIME to waiting for the attendee's video frame, within the same YouTube-based helpers the branch has today. Six leaf titles repeated within a spec file, so -g and title-based lists could not tell the tests apart. They now say what differs: the breakout duration change in the creation form or of running rooms, the unified layout minimize for a moderator without or in audio, and the four layout tests named after the parameter they use (meetingLayout= or enforceLayout=). No workflow, README, sdk-flaky-tests.txt or snapshot name refers to the old titles; the four layout tests keep their quarantine tag and issue link.
Ports parts of #25931 to BBB 4.0+
What does this PR do?
It forward-ports the test fix of #25931 to 4.0, so that
Recording > Player > Play/Pausestops failing at random. The commit is cherry-picked unchanged from 3.0 (4c86761).currentTimehas not moved after the wait. It takes the reference width of the progress bar only once two readings 250 ms apart agree. A playback that keeps running still fails, on the paused flag, oncurrentTime, or because the width never settles.The other commit of #25931 (
fix(layout): apply the meeting layout reliably when a user joins) is not ported. The code it fixed, an in-place change ofSettings.applicationinpushLayoutEngine.jsx, is not on 4.0, where the layout is applied throughuseLayoutUpdater.Motivation
Recording > Player > Play/Pausefails now and then in 4.0 CI. On PR #26085 (run 38889384779) it failed on both attempts: the bar measured 416 px right after the pause and 423 px two seconds later (420 and 428 px on the retry).The player does pause at once; its
currentTimestops. But video.js draws the progress bar at its final width one or two frames later, about 30 ms after thepauseevent. The test reads the width 13 to 19 ms after its pause click, according to the CI traces, so the read can land before that last update. 3.0 had the same failure until #25931.How to test
Results on a 4.0 dev container (bbb-playback v5.4.7, which has the same video.js 7.21.4 as v5.4.8):
v4.0.x-developPlay/Pause, spec repeatedSeek forward and backward, spec repeatedThe failure is timing-dependent, and like on 3.0 the spec did not fail locally without this PR either. So I also applied both checks to the same pauses, using a script that repeats the test's steps on the real player. On the 3 pauses where the current check failed, the ported check waited for the bar to settle and passed. In all 48 pauses the media was paused and
currentTimedid not move.