File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ if (process.argv[2] === 'child') {
1818
1919 const { Worker } = require ( 'worker_threads' ) ;
2020 const w = new Worker ( fixtures . path ( 'workload' , 'spin.js' ) , {
21- env : { NODE_TEST_SPIN_MS : 100 }
21+ env : { NODE_TEST_SPIN_MS : 1000 }
2222 } ) ;
2323
2424 w . on ( 'exit' , common . mustCall ( ( ) => {
@@ -58,8 +58,8 @@ if (process.argv[2] === 'child') {
5858 console . log ( 'parent ticks' , parentTicks . length ) ;
5959 // When not tracking Worker threads, only 1 or 2 ticks would
6060 // have been recorded.
61- // prof_sampling_interval is by default 1 millsecond, so spinning for 100
62- // milliseconds should result in ~100 ticks.
61+ // prof_sampling_interval is by default 1 millsecond. A higher NODE_TEST_SPIN_MS
62+ // should result in more ticks, while 15 should be safe on most machines .
6363 assert ( workerTicks . length > 15 , `worker ticks <= 15:\n${ workerTicks . join ( '\n' ) } ` ) ;
6464 assert ( parentTicks . length > 15 , `parent ticks <= 15:\n${ parentTicks . join ( '\n' ) } ` ) ;
6565}
You can’t perform that action at this time.
0 commit comments