From 989ec729bb7d9a4d0d96548a4540b82e40ce8b44 Mon Sep 17 00:00:00 2001 From: John Bogovic Date: Fri, 4 Oct 2024 11:02:34 -0400 Subject: [PATCH] test/wip: BdvMetadataIoTests clearer assertions --- .../janelia/saalfeldlab/n5/bdv/BdvMetadataIoTests.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/janelia/saalfeldlab/n5/bdv/BdvMetadataIoTests.java b/src/test/java/org/janelia/saalfeldlab/n5/bdv/BdvMetadataIoTests.java index 4196111..32cbfd5 100644 --- a/src/test/java/org/janelia/saalfeldlab/n5/bdv/BdvMetadataIoTests.java +++ b/src/test/java/org/janelia/saalfeldlab/n5/bdv/BdvMetadataIoTests.java @@ -99,11 +99,11 @@ public & NativeType, V extends Volatile & Numeri Arrays.asList(N5ViewerCreator.n5vGroupParsers)); final N5TreeNode root = datasetDiscoverer.discoverAndParseRecursive(""); - assertNotNull("root is null", root); + assertNotNull("Root node is null", root); final Optional metaOpt = root.getDescendant(readerDataset); - if (!metaOpt.isPresent()) - fail("could not find metadata at: " + readerDataset); + assertTrue( String.format( "[%s] Could not find descendant node: %s ", outputPath, readerDataset ), + metaOpt.isPresent()); final List converterSetups = new ArrayList<>(); final List> sourcesAndConverters = new ArrayList<>(); @@ -148,6 +148,8 @@ public & NativeType, V extends Volatile & Numeri final List> srcList = sourcesAndConverters.stream().map(sac -> sac.getSpimSource()).collect(Collectors.toList()); assertTrue(String.format("%s data ", dataset), sourceDataIdentical(imp, srcList)); } + + n5.close(); } }