-
Notifications
You must be signed in to change notification settings - Fork 10k
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
[Meta] Fix intermittent issues in the integration tests #18396
Comments
Note to self, the following is useful for reproducing scripting-related intermittents locally: diff --git a/web/pdf_scripting_manager.js b/web/pdf_scripting_manager.js
index 63d08c604..68d1b8a21 100644
--- a/web/pdf_scripting_manager.js
+++ b/web/pdf_scripting_manager.js
@@ -177,6 +177,7 @@ class PDFScriptingManager {
return; // The document was closed while the properties resolved.
}
+ await new Promise(r => setTimeout(r, 2000));
await this.#scripting.createSandbox({
objects,
calculationOrder, diff --git a/src/pdf.sandbox.external.js b/src/pdf.sandbox.external.js
index 365d94a60..af646c29f 100644
--- a/src/pdf.sandbox.external.js
+++ b/src/pdf.sandbox.external.js
@@ -67,7 +67,7 @@ export class SandboxSupportBase {
}
try {
args = this.exportValueToSandbox(args);
- this.commFun(name, args);
+ this.win.setTimeout(this.commFun.bind(this, name, args), 1000);
} catch (e) {
this.win.console.error(e);
|
For the |
…tests The `waitForClick` helper function is functionality-wise mostly a reduced copy of the more generic `waitForEvent` helper function that we use for other integration tests, so we can safely replace it to reduce the amount of code. Moreover, the `waitForClick` code is prone to intermittent failures given recent assertion failures we have seen on the bots (one of them is linked in mozilla#18396) while `waitForEvent` has recently been fixed to avoid such intermittent failures, so this should also remove the flakiness for these integration tests.
…tests The `waitForClick` helper function is functionality-wise mostly a reduced copy of the more generic `waitForEvent` helper function that we use for other integration tests, so we can safely replace it to reduce the amount of code. Moreover, the `waitForClick` code is prone to intermittent failures given recent assertion failures we have seen on the bots (one of them is linked in mozilla#18396) while `waitForEvent` has recently been fixed to avoid intermittent failures, so usiong it should also get rid of the flakiness for these integration tests.
I have debugged the
My suspicion is that the fact that this throws during serialization breaks the annotation storage's map and causes the next However, I don't know enough about the stamp editor implementation to pinpoint exactly what's wrong. It looks like a race condition where the stamp editor may not expect its @calixteman Does this ring a bell for you, since you're much more familiar with the stamp editor than I am? |
Despite having fixed the most occurring intermittent failures in the integration tests (see the closed issues with the
intermittent
label) we unfortunately still have a few of them left that trigger from time to time. We should list and fix them. This issue is a meta issue for this effort.The following intermittents have been found on the bots as of July 4th, 2024, which is after landing all previously identified improvements:
The text was updated successfully, but these errors were encountered: