File tree Expand file tree Collapse file tree 5 files changed +15
-4
lines changed
packages/respect-core/src Expand file tree Collapse file tree 5 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @redocly/respect-core " : patch
3+ " @redocly/cli " : patch
4+ ---
5+
6+ Made ` executionTimeout ` parameter optional in the ` run ` function exported from ` respect-core ` .
Original file line number Diff line number Diff line change @@ -608,6 +608,7 @@ const basicCTX = {
608608 workflow : undefined ,
609609 skip : undefined ,
610610 verbose : true ,
611+ executionTimeout : 3_600_000 ,
611612 metadata : {
612613 _ : [ ] ,
613614 files : [ 'runStepTest.yml' ] ,
Original file line number Diff line number Diff line change @@ -164,7 +164,10 @@ export async function runStep({
164164 return { shouldEnd : true } ;
165165 }
166166
167- if ( Timer . getInstance ( ctx . options . executionTimeout ) . isTimedOut ( ) ) {
167+ if (
168+ ctx . options . executionTimeout &&
169+ Timer . getInstance ( ctx . options . executionTimeout ) . isTimedOut ( )
170+ ) {
168171 step . checks . push ( {
169172 name : CHECKS . GLOBAL_TIMEOUT_ERROR ,
170173 message : `Global Respect timer reached` ,
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export type RespectOptions = {
2020 config : Config ;
2121 maxSteps : number ;
2222 maxFetchTimeout : number ;
23- executionTimeout : number ;
23+ executionTimeout ? : number ;
2424 collectSpecData ?: CollectFn ;
2525 requestFileLoader : { getFileBody : ( filePath : string ) => Promise < Blob > } ;
2626 envVariables ?: Record < string , string > ;
@@ -34,7 +34,8 @@ export type RespectOptions = {
3434export async function run ( options : RespectOptions ) : Promise < RunFileResult [ ] > {
3535 const { files, executionTimeout, collectSpecData } = options ;
3636
37- Timer . getInstance ( executionTimeout ) ;
37+ // Don't create a timer if executionTimeout is not set
38+ executionTimeout && Timer . getInstance ( executionTimeout ) ;
3839
3940 const testsRunProblemsStatus : boolean [ ] = [ ] ;
4041 const runAllFilesResult = [ ] ;
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ export type AppOptions = {
124124 severity ?: string | string [ ] ;
125125 maxSteps : number ;
126126 maxFetchTimeout : number ;
127- executionTimeout : number ;
127+ executionTimeout ? : number ;
128128 config : Config ;
129129 requestFileLoader : { getFileBody : ( filePath : string ) => Promise < Blob > } ;
130130 fetch : typeof fetch ;
You can’t perform that action at this time.
0 commit comments