File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ nodeOnly(() => {
6060 } ) ;
6161
6262 it ( "should be able to generate a CA certificate that passes lintcert checks" , async function ( ) {
63+ this . retries ( 3 ) ; // Remote server can be unreliable
64+
6365 const caCertificate = await caCertificatePromise ;
6466
6567 const { cert } = caCertificate ;
@@ -89,6 +91,7 @@ nodeOnly(() => {
8991
9092 it ( "should generate CA certs that can be used to create domain certs that pass lintcert checks" , async function ( ) {
9193 this . timeout ( 5000 ) ; // Large cert + remote request can make this slow
94+ this . retries ( 3 ) ; // Remote server can be unreliable
9295
9396 const caCertificate = await caCertificatePromise ;
9497 const ca = new CA ( { key : caCertificate . key , cert : caCertificate . cert , keyLength : 2048 } ) ;
@@ -132,6 +135,7 @@ nodeOnly(() => {
132135
133136 it ( "should generate wildcard certs that pass lintcert checks for invalid subdomain names" , async function ( ) {
134137 this . timeout ( 5000 ) ; // Large cert + remote request can make this slow
138+ this . retries ( 3 ) ; // Remote server can be unreliable
135139
136140 const caCertificate = await caCertificatePromise ;
137141 const ca = new CA ( { key : caCertificate . key , cert : caCertificate . cert , keyLength : 2048 } ) ;
Original file line number Diff line number Diff line change @@ -108,8 +108,8 @@ export async function ignoreNetworkError<T extends RequestPromise | Promise<Resp
108108 const TimeoutError = new Error ( 'timeout' ) ;
109109
110110 const result = await Promise . race ( [
111- request . catch ( e => e ) ,
112- delay ( options . timeout ?? 1000 ) . then ( ( ) => { throw TimeoutError } )
111+ request ,
112+ delay ( options . timeout ?? 1000 ) . then ( ( ) => { throw TimeoutError ; } )
113113 ] ) . catch ( error => {
114114 console . log ( error ) ;
115115 if ( error === TimeoutError ) {
You can’t perform that action at this time.
0 commit comments