11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ciconst common = require('../common'); 31cb0ef41Sopenharmony_ciconst assert = require('assert'); 41cb0ef41Sopenharmony_ciconst child_process = require('child_process'); 51cb0ef41Sopenharmony_ciconst child = child_process.spawn(process.execPath, [ 61cb0ef41Sopenharmony_ci '--interactive', 71cb0ef41Sopenharmony_ci '--expose-gc', 81cb0ef41Sopenharmony_ci], { 91cb0ef41Sopenharmony_ci stdio: 'pipe' 101cb0ef41Sopenharmony_ci}); 111cb0ef41Sopenharmony_cichild.stdin.write('\nimport("fs");\n_.then(gc);\n'); 121cb0ef41Sopenharmony_ci// Wait for concurrent GC to finish 131cb0ef41Sopenharmony_cisetTimeout(() => { 141cb0ef41Sopenharmony_ci child.stdin.write('\nimport("fs");\n'); 151cb0ef41Sopenharmony_ci child.stdin.write('\nprocess.exit(0);\n'); 161cb0ef41Sopenharmony_ci}, common.platformTimeout(50)); 171cb0ef41Sopenharmony_cichild.on('exit', (code, signal) => { 181cb0ef41Sopenharmony_ci assert.strictEqual(code, 0); 191cb0ef41Sopenharmony_ci assert.strictEqual(signal, null); 201cb0ef41Sopenharmony_ci}); 21