@@ -38,6 +38,7 @@ export type CheckRunId = string
3838export type SequenceId = string
3939
4040export const DEFAULT_CHECK_RUN_TIMEOUT_SECONDS = 600
41+ export const DEFAULT_PLAYWRIGHT_CHECK_RUN_TIMEOUT_SECONDS = 1200
4142
4243const DEFAULT_SCHEDULING_DELAY_EXCEEDED_MS = 20000
4344
@@ -197,10 +198,13 @@ export default abstract class AbstractCheckRunner extends EventEmitter {
197198 }
198199
199200 private setAllTimeouts ( ) {
200- Array . from ( this . checks . entries ( ) ) . forEach ( ( [ sequenceId , { check } ] ) =>
201+ Array . from ( this . checks . entries ( ) ) . forEach ( ( [ sequenceId , { check } ] ) => {
202+ const checkTimeout = ( check instanceof PlaywrightCheck && this . timeout === DEFAULT_CHECK_RUN_TIMEOUT_SECONDS )
203+ ? DEFAULT_PLAYWRIGHT_CHECK_RUN_TIMEOUT_SECONDS
204+ : this . timeout
201205 this . timeouts . set ( sequenceId , setTimeout ( ( ) => {
202206 this . timeouts . delete ( sequenceId )
203- let errorMessage = `Reached timeout of ${ this . timeout } seconds waiting for check result.`
207+ let errorMessage = `Reached timeout of ${ checkTimeout } seconds waiting for check result.`
204208 // Playwright checks can take longer.
205209 // We should point the user to the --timeout flag in that case.
206210 if ( check instanceof PlaywrightCheck ) {
@@ -212,8 +216,9 @@ export default abstract class AbstractCheckRunner extends EventEmitter {
212216 }
213217 this . emit ( Events . CHECK_FAILED , sequenceId , check , errorMessage )
214218 this . emit ( Events . CHECK_FINISHED , check )
215- } , this . timeout * 1000 ) ,
216- ) )
219+ } , checkTimeout * 1000 ) ,
220+ )
221+ } )
217222 }
218223
219224 private disableAllTimeouts ( ) {
0 commit comments