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(() => {
60
60
} ) ;
61
61
62
62
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
+
63
65
const caCertificate = await caCertificatePromise ;
64
66
65
67
const { cert } = caCertificate ;
@@ -89,6 +91,7 @@ nodeOnly(() => {
89
91
90
92
it ( "should generate CA certs that can be used to create domain certs that pass lintcert checks" , async function ( ) {
91
93
this . timeout ( 5000 ) ; // Large cert + remote request can make this slow
94
+ this . retries ( 3 ) ; // Remote server can be unreliable
92
95
93
96
const caCertificate = await caCertificatePromise ;
94
97
const ca = new CA ( { key : caCertificate . key , cert : caCertificate . cert , keyLength : 2048 } ) ;
@@ -132,6 +135,7 @@ nodeOnly(() => {
132
135
133
136
it ( "should generate wildcard certs that pass lintcert checks for invalid subdomain names" , async function ( ) {
134
137
this . timeout ( 5000 ) ; // Large cert + remote request can make this slow
138
+ this . retries ( 3 ) ; // Remote server can be unreliable
135
139
136
140
const caCertificate = await caCertificatePromise ;
137
141
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
108
108
const TimeoutError = new Error ( 'timeout' ) ;
109
109
110
110
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 ; } )
113
113
] ) . catch ( error => {
114
114
console . log ( error ) ;
115
115
if ( error === TimeoutError ) {
You can’t perform that action at this time.
0 commit comments