File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -329,9 +329,14 @@ async function main() {
329329 testNames . map ( async ( test ) => {
330330 const dirName = path . dirname ( test )
331331 let dirSema = directorySemas . get ( dirName )
332- if ( dirSema === undefined )
333- directorySemas . set ( dirName , ( dirSema = new Sema ( 1 ) ) )
334- await dirSema . acquire ( )
332+
333+ if ( ! testType ) {
334+ // limit integration tests to one active in a directory at a
335+ // time, isolated tests (e2e, dev, prod) don't need to be limited
336+ if ( dirSema === undefined )
337+ directorySemas . set ( dirName , ( dirSema = new Sema ( 1 ) ) )
338+ await dirSema . acquire ( )
339+ }
335340 await sema . acquire ( )
336341 let passed = false
337342
@@ -383,7 +388,10 @@ async function main() {
383388 cleanUpAndExit ( 1 )
384389 }
385390 sema . release ( )
386- dirSema . release ( )
391+
392+ if ( dirSema ) {
393+ dirSema . release ( )
394+ }
387395 } )
388396 )
389397
You can’t perform that action at this time.
0 commit comments