Skip to content

Commit bf7fea7

Browse files
authored
Windows e2e deployment timeout update (#779)
* bump sandbox deploy threshold on windows * add changeset * update comment * update threshold * refactor windows specific threshold
1 parent a05df77 commit bf7fea7

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

.changeset/red-berries-promise.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

packages/integration-tests/src/process-controller/predicated_action_macros.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { PredicatedActionBuilder } from './predicated_action_queue_builder.js';
2+
import { PlatformDeploymentThresholds } from '../test-project-setup/test_project_base.js';
23

34
/**
45
* Convenience predicated actions that can be used to build up more complex CLI flows.
@@ -57,8 +58,12 @@ export const interruptSandbox = () => waitForSandboxToBecomeIdle().sendCtrlC();
5758
* Reusable predicated action: Wait for sandbox to finish deployment and assert that the deployment time is less
5859
* than the threshold.
5960
*/
60-
export const ensureDeploymentTimeLessThan = (seconds: number) => {
61+
export const ensureDeploymentTimeLessThan = (
62+
platformThresholds: PlatformDeploymentThresholds
63+
) => {
6164
return waitForSandboxDeploymentToPrintTotalTime().ensureDeploymentTimeLessThan(
62-
seconds
65+
process.platform.startsWith('win')
66+
? platformThresholds.onWindows
67+
: platformThresholds.onOther
6368
);
6469
};

packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ class DataStorageAuthWithTriggerTestProject extends TestProjectBase {
133133
{
134134
sourceFile: sourceDataResourceFile,
135135
projectFile: dataResourceFile,
136-
deployThresholdSec: 30,
136+
deployThresholdSec: {
137+
onWindows: 40,
138+
onOther: 30,
139+
},
137140
},
138141
];
139142
}

packages/integration-tests/src/test-project-setup/test_project_base.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,23 @@ import {
1919
import fsp from 'fs/promises';
2020
import assert from 'node:assert';
2121

22+
export type PlatformDeploymentThresholds = {
23+
onWindows: number;
24+
onOther: number;
25+
};
26+
2227
/**
2328
* Keeps test project update info.
2429
*/
2530
export type TestProjectUpdate = {
2631
sourceFile: URL;
2732
projectFile: URL;
28-
deployThresholdSec: number;
33+
/**
34+
* Define a threshold for the hotswap deployment time
35+
* Windows has a separate threshold because it is consistently slower than other platforms
36+
* https://github.com/microsoft/Windows-Dev-Performance/issues/17
37+
*/
38+
deployThresholdSec: PlatformDeploymentThresholds;
2939
};
3040

3141
/**

0 commit comments

Comments
 (0)