summaryrefslogtreecommitdiffstats
path: root/container-core/src/test/java/com
diff options
context:
space:
mode:
authorValerij Fredriksen <valerijf@yahooinc.com>2022-09-21 13:36:57 +0200
committerValerij Fredriksen <valerijf@yahooinc.com>2022-09-21 13:36:57 +0200
commit2b9ed1a5ceabbaf63e615e3acd2a4d9f6be11a3d (patch)
tree52cc3c82de1ff517a61bb8a7c6834a41f3e72c5f /container-core/src/test/java/com
parentf81800f066f3291bfd6c3ecbca4a58008ddf9137 (diff)
Non-functional cleanup
Diffstat (limited to 'container-core/src/test/java/com')
-rw-r--r--container-core/src/test/java/com/yahoo/container/handler/LogReaderTest.java13
1 files changed, 2 insertions, 11 deletions
diff --git a/container-core/src/test/java/com/yahoo/container/handler/LogReaderTest.java b/container-core/src/test/java/com/yahoo/container/handler/LogReaderTest.java
index 106b8cef35f..a6db98b6cf5 100644
--- a/container-core/src/test/java/com/yahoo/container/handler/LogReaderTest.java
+++ b/container-core/src/test/java/com/yahoo/container/handler/LogReaderTest.java
@@ -37,7 +37,7 @@ public class LogReaderTest {
@BeforeEach
public void setup() throws IOException {
- logDirectory = newFolder(folder, "opt/vespa/logs").toPath();
+ logDirectory = Files.createDirectories(folder.toPath().resolve("opt/vespa/logs"));
// Log archive paths and file names indicate what hour they contain logs for, with the start of that hour.
// Multiple entries may exist for each hour.
Files.createDirectories(logDirectory.resolve("1970/01/01"));
@@ -100,18 +100,9 @@ public class LogReaderTest {
return baos.toByteArray();
}
- private byte[] compress2(String input) throws IOException {
+ private byte[] compress2(String input) {
byte[] data = input.getBytes();
return new ZstdCompressor().compress(data, 0, data.length);
}
- private static File newFolder(File root, String... subDirs) throws IOException {
- String subFolder = String.join("/", subDirs);
- File result = new File(root, subFolder);
- if (!result.mkdirs()) {
- throw new IOException("Couldn't create folders " + root);
- }
- return result;
- }
-
}