Skip to content

Fix intermittent failure in the "supports specifying a custom origin" viewer integration test #19952

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

Merged

Conversation

timvandermeij
Copy link
Contributor

The problem in the original code is that getTextAt is called too early and therefore returns unexpected text content. This can happen because we call increaseScale and then wait for the page's text layer to be visible, but it can take some time before the zoom actually occurs/completes in the viewer and in the meantime the old (pre-zoom) text layer may still be visible, causing us to continue too soon because we don't validate that we're dealing with the post-zoom text layer.

This commit fixes the issue by simply waiting for the expected text to show up at the given origin coordinates, which makes the test work independent of viewer actions/timing.

Fixes #19951.

@timvandermeij
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @timvandermeij received. Current queue size: 0

Live output at: http://54.241.84.105:8877/3c8ede823a1c2b9/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @timvandermeij received. Current queue size: 0

Live output at: http://54.193.163.58:8877/88a7235c7eb8fb2/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/3c8ede823a1c2b9/output.txt

Total script time: 12.61 mins

  • Integration Tests: FAILED

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/88a7235c7eb8fb2/output.txt

Total script time: 29.63 mins

  • Integration Tests: Passed

@timvandermeij timvandermeij force-pushed the intermittent-viewer-origin branch 2 times, most recently from cf658f0 to d818a5e Compare May 25, 2025 13:32
@timvandermeij
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @timvandermeij received. Current queue size: 0

Live output at: http://54.193.163.58:8877/13073f974737630/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @timvandermeij received. Current queue size: 0

Live output at: http://54.241.84.105:8877/1b66907c06be890/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/1b66907c06be890/output.txt

Total script time: 12.95 mins

  • Integration Tests: FAILED

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/13073f974737630/output.txt

Total script time: 30.97 mins

  • Integration Tests: FAILED

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you.

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

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

r=me, thank you.

… viewer integration test

The problem in the original code is that `getTextAt` is called too
early and therefore returns unexpected text content. This can happen
because we call `increaseScale` and then wait for the page's text layer
to be visible, but it can take some time before the zoom actually
occurs/completes in the viewer and in the meantime the old (pre-zoom)
text layer may still be visible, causing us to continue too soon because
we don't validate that we're dealing with the post-zoom text layer.

This commit fixes the issue by simply waiting for the expected text to
show up at the given origin coordinates, which makes the test work
independent of viewer actions/timing.
@timvandermeij timvandermeij force-pushed the intermittent-viewer-origin branch from d818a5e to f251e60 Compare June 1, 2025 17:34
@timvandermeij
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @timvandermeij received. Current queue size: 0

Live output at: http://54.241.84.105:8877/eb55e466e5a17a0/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @timvandermeij received. Current queue size: 0

Live output at: http://54.193.163.58:8877/6eb9d4a1cff2724/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/eb55e466e5a17a0/output.txt

Total script time: 13.00 mins

  • Integration Tests: FAILED

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/6eb9d4a1cff2724/output.txt

Total script time: 31.07 mins

  • Integration Tests: FAILED

@timvandermeij timvandermeij merged commit 47ad820 into mozilla:master Jun 1, 2025
7 checks passed
@timvandermeij timvandermeij deleted the intermittent-viewer-origin branch June 1, 2025 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Intermittent failure in the "supports specifying a custom origin" viewer integration test
4 participants