From 93624c5674fe098f3ea4a243adbf81e627d4e97c Mon Sep 17 00:00:00 2001 From: Paulo Lobo Date: Sun, 5 Aug 2018 02:02:23 -0300 Subject: [PATCH] For #1232: Run testing part of update_heapdump.groovy just in tests. --- .../stk/internal/update_heapdump.groovy | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/src/main/groovy/com/zerocracy/stk/internal/update_heapdump.groovy b/src/main/groovy/com/zerocracy/stk/internal/update_heapdump.groovy index ae8d0c391..e5613d4ca 100644 --- a/src/main/groovy/com/zerocracy/stk/internal/update_heapdump.groovy +++ b/src/main/groovy/com/zerocracy/stk/internal/update_heapdump.groovy @@ -32,21 +32,25 @@ def exec(Project project, XML xml) { new Assume(project, xml).type('Ping hourly') Farm farm = binding.variables.farm if (new Props(farm).has('//testing')) { - Bucket bucket; - project.acq('test/bucket').withCloseable { - bucket = new FkBucket( - it.path(), - 'dumpbucket' - ) - } - Logger.info(this, 'Saving test heap') project.acq('test').withCloseable { - new HeapDump( - bucket, - '', - it.path(), - 'heap' - ).save() + if (it.path().toString().contains('update_heapdump')) { + Bucket bucket; + project.acq('test/bucket').withCloseable { + bucket = new FkBucket( + it.path(), + 'dumpbucket' + ) + } + Logger.info(this, 'Saving test heap') + project.acq('test').withCloseable { + new HeapDump( + bucket, + '', + it.path(), + 'heap' + ).save() + } + } } } else { try {