File tree 1 file changed +3
-3
lines changed
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') {
18
18
19
19
const { Worker } = require ( 'worker_threads' ) ;
20
20
const w = new Worker ( fixtures . path ( 'workload' , 'spin.js' ) , {
21
- env : { NODE_TEST_SPIN_MS : 100 }
21
+ env : { NODE_TEST_SPIN_MS : 1000 }
22
22
} ) ;
23
23
24
24
w . on ( 'exit' , common . mustCall ( ( ) => {
@@ -58,8 +58,8 @@ if (process.argv[2] === 'child') {
58
58
console . log ( 'parent ticks' , parentTicks . length ) ;
59
59
// When not tracking Worker threads, only 1 or 2 ticks would
60
60
// 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 .
63
63
assert ( workerTicks . length > 15 , `worker ticks <= 15:\n${ workerTicks . join ( '\n' ) } ` ) ;
64
64
assert ( parentTicks . length > 15 , `parent ticks <= 15:\n${ parentTicks . join ( '\n' ) } ` ) ;
65
65
}
You can’t perform that action at this time.
0 commit comments