Skip to content

Commit fe004e2

Browse files
committed
test: Fix race condition expectations
1 parent f58e550 commit fe004e2

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

packages/project/test/lib/graph/helpers/ui5Framework.integration.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -759,13 +759,10 @@ defineErrorTest(
759759
frameworkName: "OpenUI5",
760760
failMetadata: true,
761761
failExtract: true,
762-
// fetchPackageManifest now runs through _synchronize("manifest-...") which adds async
763-
// overhead, so the concurrent installPackage extraction error arrives first when both fail.
764-
expectedErrorMessage: `Resolution of framework libraries failed with errors:
765-
1. Failed to resolve library sap.ui.lib1: Failed to extract package @openui5/sap.ui.lib1@1.75.0: ` +
766-
`404 - @openui5/sap.ui.lib1
767-
2. Failed to resolve library sap.ui.lib4: Failed to extract package @openui5/sap.ui.lib4@1.75.0: ` +
768-
`404 - @openui5/sap.ui.lib4`
762+
// When both manifest fetch and extraction fail simultaneously, which error surfaces first
763+
// depends on microtask scheduling and is not deterministic across Node versions. Both are
764+
// valid: accept either "Failed to read manifest" or "Failed to extract package".
765+
expectedErrorMessage: /Resolution of framework libraries failed with errors:\n\s+1\. Failed to resolve library sap\.ui\.lib1: Failed to (read manifest of|extract package) @openui5\/sap\.ui\.lib1@1\.75\.0/
769766
});
770767

771768
test.serial("ui5Framework helper should not fail when no framework configuration is given", async (t) => {

0 commit comments

Comments
 (0)