Skip to content

Commit

Permalink
test: TestExportImports remove TestRunners
Browse files Browse the repository at this point in the history
  • Loading branch information
bogovicj committed Dec 17, 2024
1 parent bd014a1 commit 474f742
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions src/test/java/org/janelia/saalfeldlab/n5/TestExportImports.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,7 @@ public void test4dN5v()
{
final String n5PathAndDataset = String.format("%s/%s/c%d/s0", n5RootPath, dataset, i);

final Optional<List<ImagePlus>> impListOpt = TestRunners.tryWaitRepeat(() -> {
return reader.process(n5PathAndDataset, false);
});

final Optional<List<ImagePlus>> impListOpt = Optional.of(reader.process(n5PathAndDataset, false));
List<ImagePlus> impList;
if (impListOpt.isPresent()) {
impList = impListOpt.get();
Expand Down Expand Up @@ -319,10 +316,7 @@ else if (metadataType.equals(N5Importer.MetadataOmeZarrKey) || metadataType.equa
// consider testing this files existence before trying to read?
final N5Importer reader = new N5Importer();
reader.setShow(false);
final Optional<List< ImagePlus >> impListOpt = TestRunners.tryWaitRepeat( () -> {
return reader.process(n5PathAndDataset, false);
});

Optional<List<ImagePlus>> impListOpt = Optional.of(reader.process(n5PathAndDataset, false));
List<ImagePlus> impList;
if (impListOpt.isPresent()) {
impList = impListOpt.get();
Expand Down Expand Up @@ -421,9 +415,7 @@ public void testOverwrite() throws InterruptedException {

try (final N5Writer n5 = new N5FSWriter(n5Root)) {

Optional<DatasetAttributes> dsetAttrsOpt = TestRunners.tryWaitRepeat(() -> {
return n5.getDatasetAttributes(dataset);
});
Optional<DatasetAttributes> dsetAttrsOpt = Optional.of( n5.getDatasetAttributes(dataset));

DatasetAttributes dsetAttrs;
if (dsetAttrsOpt.isPresent()) {
Expand All @@ -443,10 +435,7 @@ public void testOverwrite() throws InterruptedException {
writerNoOverride.setOverwrite(false);
writerNoOverride.run();

dsetAttrsOpt = TestRunners.tryWaitRepeat(() -> {
return n5.getDatasetAttributes(dataset);
});

dsetAttrsOpt = Optional.of(n5.getDatasetAttributes(dataset));
if (dsetAttrsOpt.isPresent()) {
dsetAttrs = dsetAttrsOpt.get();
assertArrayEquals("size after no overwrite", szBig, dsetAttrs.getDimensions());
Expand All @@ -464,10 +453,7 @@ public void testOverwrite() throws InterruptedException {
writerOverride.setOverwrite(true);
writerOverride.run();

dsetAttrsOpt = TestRunners.tryWaitRepeat(() -> {
return n5.getDatasetAttributes(dataset);
});

dsetAttrsOpt = Optional.of(n5.getDatasetAttributes(dataset));
if (dsetAttrsOpt.isPresent()) {
dsetAttrs = dsetAttrsOpt.get();
assertArrayEquals("size after overwrite", szSmall, dsetAttrs.getDimensions());
Expand Down

0 comments on commit 474f742

Please sign in to comment.