Skip to content

Commit 504c83f

Browse files
committed
Revert "refactor(platform-server): reduce timeout used in tests (angular#59275)"
This reverts commit 19ec826.
1 parent 0bf6f76 commit 504c83f

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

packages/platform-server/test/incremental_hydration_spec.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ function dynamicImportOf<T>(type: T, timeout = 0): Promise<T> {
6565
* Helper function to await all pending dynamic imports
6666
* emulated using `dynamicImportOf` function.
6767
*/
68-
function allPendingDynamicImports(timeout?: number) {
69-
return dynamicImportOf(null, timeout ?? 10);
68+
function allPendingDynamicImports() {
69+
return dynamicImportOf(null, 101);
7070
}
7171

7272
describe('platform-server partial hydration integration', () => {
@@ -2364,12 +2364,10 @@ describe('platform-server partial hydration integration', () => {
23642364
location = inject(Location);
23652365
}
23662366

2367-
const dynamicImportTimeout = 5; // ms
2368-
23692367
const deferDepsInterceptor = {
23702368
intercept() {
23712369
return () => {
2372-
return [dynamicImportOf(DeferredCmp, dynamicImportTimeout)];
2370+
return [dynamicImportOf(DeferredCmp, 100)];
23732371
};
23742372
},
23752373
};
@@ -2399,12 +2397,10 @@ describe('platform-server partial hydration integration', () => {
23992397

24002398
const routeLink = doc.getElementById('route-link')!;
24012399
routeLink.click();
2402-
// Wait a bit longer than a timeout used to emulate a dynamic import.
2403-
await allPendingDynamicImports(dynamicImportTimeout * 2);
2400+
await allPendingDynamicImports();
24042401
appRef.tick();
24052402

2406-
// Wait a bit longer than a timeout used to emulate a dynamic import.
2407-
await allPendingDynamicImports(dynamicImportTimeout * 2);
2403+
await allPendingDynamicImports();
24082404
await appRef.whenStable();
24092405

24102406
expect(location.path()).toBe('/other/thing/stuff');

0 commit comments

Comments
 (0)