Skip to content

Commit

Permalink
chore(test): don't call remove() on createTemp...Writer()
Browse files Browse the repository at this point in the history
  • Loading branch information
cmhulbert committed Mar 1, 2024
1 parent 25efb84 commit 1b3f213
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/test/java/org/janelia/saalfeldlab/n5/zarr/N5ZarrTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,6 @@ public void testCreateNestedDataset() throws IOException {
assertEquals("/", n5Nested.getZArrayAttributes(datasetName).getDimensionSeparator());

// TODO test that parents of nested dataset are groups

n5Nested.remove(datasetName);
n5Nested.remove();
n5Nested.close();
}

@Test
Expand All @@ -224,8 +220,6 @@ public void testCreateDatasetNameEmpty() {
final String testDirPath = tempN5Location();
final N5Writer n5 = createTempN5Writer(testDirPath);
n5.createDataset("", dimensions, blockSize, DataType.UINT64, getCompressions()[0]);
n5.remove();
n5.close();
}

@Test
Expand Down Expand Up @@ -408,7 +402,6 @@ public void testWriteReadStringBlock() {
Compression[] compressions = this.getCompressions();

for (Compression compression : compressions) {
System.out.println("Testing " + compression.getType() + " " + dataType);

try (final N5Writer n5 = createTempN5Writer()) {
n5.createDataset("/test/group/dataset", dimensions, blockSize, dataType, compression);
Expand Down Expand Up @@ -657,11 +650,6 @@ public void testReadZarrPython() throws IOException, InterruptedException {
strAttributes = n5Zarr.getDatasetAttributes(datasetName);
loadedDataBlock = n5Zarr.readBlock(datasetName, strAttributes, 1L, 0L);
assertArrayEquals(expected, ((String[])loadedDataBlock.getData()));

/* remove the container */
n5Zarr.remove();
n5Zarr.close();
n5ZarrWithoutMapping.close();
}

@Test
Expand Down Expand Up @@ -689,10 +677,6 @@ public void testReadZarrNestedPython() throws IOException, InterruptedException

final UnsignedByteType refUnsignedByte = new UnsignedByteType();
assertIsSequence(N5Utils.open(n5Zarr, testZarrDatasetName + "/3x2_c_u1"), refUnsignedByte);

/* remove the container */
n5Zarr.remove();
n5Zarr.close();
}

@Test
Expand All @@ -712,9 +696,6 @@ public void testRawCompressorNullInZarray() throws IOException, ParseException,
final JSONObject zarray = (JSONObject)jsonParser.parse(reader);
final JSONObject compressor = (JSONObject)zarray.get("compressor");
assertNull(compressor);
} finally {
n5.remove();
n5.close();
}
}

Expand Down Expand Up @@ -901,8 +882,6 @@ public void testNullAttributes() {
writer.setAttribute(groupName, "existingValue", null);
assertThrows(N5ClassCastException.class, () -> writer.getAttribute(groupName, "existingValue", Integer.class));
assertEquals(JsonNull.INSTANCE, writer.getAttribute(groupName, "existingValue", JsonElement.class));

writer.remove();
}
}

Expand Down

0 comments on commit 1b3f213

Please sign in to comment.