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

Re-factor how a pending #switchAnnotationEditorModeTimeoutId is cancelled when closing the document #18850

Conversation

Snuffleupagus
Copy link
Collaborator

The likelihood of the document being closed while the #switchAnnotationEditorModeTimeoutId is pending is obviously very low, but it's still a situation we need to account for to prevent errors.
However it seems a bit unfortunate that we have to remember to manually invoke the cleanup-method, and instead we can let a pending timeout run and just check that the relevant AbortSignal hasn't been aborted before updating editor-state.

…celled when closing the document

The likelihood of the document being closed while the `#switchAnnotationEditorModeTimeoutId` is pending is obviously very low, but it's still a situation we need to account for to prevent errors.
However it seems a bit unfortunate that we have to remember to manually invoke the cleanup-method, and instead we can let a pending timeout run and just check that the relevant `AbortSignal` hasn't been aborted before updating editor-state.
@Snuffleupagus
Copy link
Collaborator Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/39d96046b9135bd/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

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

Live output at: http://54.193.163.58:8877/b19bbb89b204fc0/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/39d96046b9135bd/output.txt

Total script time: 9.82 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/b19bbb89b204fc0/output.txt

Total script time: 20.33 mins

  • Integration Tests: FAILED

@Snuffleupagus
Copy link
Collaborator Author

On second thought I suppose that potentially leaving a timeout running, even for a very short while, could affect tests negatively.

@Snuffleupagus Snuffleupagus deleted the resetView-rm-cleanupSwitchAnnotationEditorMode branch October 4, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants