The 32probe-char.test.js and32probe.test.js tests are flaky under node v8. After some investigation, I realized that it was a similar problem to #90, except that in this case both provider and probe are unreferenced, and they can get GC'd before the dtrace command is executed, which causes it to fail to find the probe, and it never runs the child JS script.
We can move the provider object up to the top level, and then call provider.disable() at the very end of the script, so that we can make sure it and the probes never get collected.
The
32probe-char.test.js
and32probe.test.js
tests are flaky under node v8. After some investigation, I realized that it was a similar problem to #90, except that in this case both provider and probe are unreferenced, and they can get GC'd before thedtrace
command is executed, which causes it to fail to find the probe, and it never runs the child JS script.We can move the provider object up to the top level, and then call
provider.disable()
at the very end of the script, so that we can make sure it and the probes never get collected.