diff --git a/tools/src/com.oracle.truffle.tools.profiler.test/src/com/oracle/truffle/tools/profiler/test/ProfilerCLITest.java b/tools/src/com.oracle.truffle.tools.profiler.test/src/com/oracle/truffle/tools/profiler/test/ProfilerCLITest.java index 477d7991dba7..dbdf3551766c 100644 --- a/tools/src/com.oracle.truffle.tools.profiler.test/src/com/oracle/truffle/tools/profiler/test/ProfilerCLITest.java +++ b/tools/src/com.oracle.truffle.tools.profiler.test/src/com/oracle/truffle/tools/profiler/test/ProfilerCLITest.java @@ -370,8 +370,9 @@ public void testSamplerJson() { period = sampler.getPeriod(); sampleCount = samplerData.getSamples(); gatherSelfHitTimes = sampler.isGatherSelfHitTimes(); - context.close(); + sampler.setCollecting(false); } + context.close(); JSONArray contexts = (JSONArray) new JSONObject(out.toString()).get("contexts"); JSONObject firstContext = (JSONObject) contexts.get(0);