File tree Expand file tree Collapse file tree 4 files changed +24
-4
lines changed
packages/integration-tests/src Expand file tree Collapse file tree 4 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ---
Original file line number Diff line number Diff line change 11import { 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} ;
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change @@ -19,13 +19,23 @@ import {
1919import fsp from 'fs/promises' ;
2020import 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 */
2530export 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/**
You can’t perform that action at this time.
0 commit comments