From ff2c1006642d762c36142df4233247eefe3b951c Mon Sep 17 00:00:00 2001 From: Tomas Kyjovsky Date: Fri, 26 Feb 2016 03:20:57 +0100 Subject: [PATCH] Fixed for Timer.saveData() --- .../src/main/java/org/keycloak/testsuite/util/Timer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/Timer.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/Timer.java index cd02e4cd42..b36c8f1911 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/Timer.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/Timer.java @@ -127,10 +127,11 @@ public class Timer { private void saveData(String op) { try { File f = new File(DATA_DIR, op.replace(" ", "_") + ".txt"); - assertTrue(f.createNewFile()); + if (!f.createNewFile()) { + throw new IOException("Couldn't create file: " + f); + } OutputStream stream = new BufferedOutputStream(new FileOutputStream(f)); for (Long duration : stats.get(op)) { -// log.info(duration); IOUtils.write(duration.toString(), stream); IOUtils.write("\n", stream); }