diff --git a/pom.xml b/pom.xml index 79a5c7f..9c75f25 100755 --- a/pom.xml +++ b/pom.xml @@ -60,4 +60,16 @@ + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.20 + + false + + + + diff --git a/src/test/java/com/github/bordertech/buildtools/BadgerTest.java b/src/test/java/com/github/bordertech/buildtools/BadgerTest.java index 473c9c1..668875a 100644 --- a/src/test/java/com/github/bordertech/buildtools/BadgerTest.java +++ b/src/test/java/com/github/bordertech/buildtools/BadgerTest.java @@ -186,9 +186,11 @@ public static boolean contains(final File file, final String search) { while (scanner.hasNextLine()) { String line = scanner.nextLine(); if (line.contains(search)) { + scanner.close(); return true; } } + scanner.close(); } catch (FileNotFoundException ex) { Assert.fail(ex.getMessage()); }