Skip to content

Commit

Permalink
Temporarily comment out some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tischi committed Nov 14, 2024
1 parent 8655534 commit 1ff6590
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 44 deletions.
28 changes: 14 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.scijava</groupId>
<artifactId>pom-scijava</artifactId>
<version>39.0.0</version>
<version>37.0.0</version>
</parent>

<groupId>org.embl.mobie</groupId>
Expand Down Expand Up @@ -112,20 +112,20 @@
<everit-json-schema.version>1.14.0</everit-json-schema.version>
<toml4j.version>0.7.2</toml4j.version>

<!-- <n5-aws-s3.version>4.2.0</n5-aws-s3.version>-->
<!-- <n5-blosc.version>1.1.1</n5-blosc.version>-->
<!-- <n5-google-cloud.version>4.1.0</n5-google-cloud.version>-->
<!-- <n5-hdf5.version>2.2.0</n5-hdf5.version>-->
<!-- <n5-ij.version>4.2.1</n5-ij.version>-->
<!-- <n5-imglib2.version>7.0.0</n5-imglib2.version>-->
<!-- <n5-universe.version>1.6.0</n5-universe.version>-->
<!-- <n5-viewer_fiji.version>6.1.1</n5-viewer_fiji.version>-->
<!-- <n5-zarr.version>1.3.4</n5-zarr.version>-->
<!-- <n5-zstandard.version>1.0.2</n5-zstandard.version>-->
<!-- <n5.version>3.2.0</n5.version>-->
<n5-aws-s3.version>4.2.0</n5-aws-s3.version>
<n5-blosc.version>1.1.1</n5-blosc.version>
<n5-google-cloud.version>4.1.0</n5-google-cloud.version>
<n5-hdf5.version>2.2.0</n5-hdf5.version>
<n5-ij.version>4.2.1</n5-ij.version>
<n5-imglib2.version>7.0.0</n5-imglib2.version>
<n5-universe.version>1.6.0</n5-universe.version>
<n5-viewer_fiji.version>6.1.1</n5-viewer_fiji.version>
<n5-zarr.version>1.3.4</n5-zarr.version>
<n5-zstandard.version>1.0.2</n5-zstandard.version>
<n5.version>3.2.0</n5.version>

<!-- <bigdataviewer-core.version>10.4.13</bigdataviewer-core.version>-->
<!-- <bigdataviewer-vistools.version>1.0.0-beta-34</bigdataviewer-vistools.version>-->
<bigdataviewer-core.version>10.4.13</bigdataviewer-core.version>
<bigdataviewer-vistools.version>1.0.0-beta-34</bigdataviewer-vistools.version>

</properties>

Expand Down
63 changes: 33 additions & 30 deletions src/test/java/org/embl/mobie/io/imagedata/N5ImageDataTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import mpicbg.spim.data.sequence.VoxelDimensions;
import org.embl.mobie.io.ImageDataFormat;
import org.embl.mobie.io.ImageDataOpener;
import org.embl.mobie.io.util.S3Utils;
import org.junit.jupiter.api.Test;

import java.util.concurrent.ExecutorService;
Expand Down Expand Up @@ -34,31 +33,35 @@ public void openOMEZarrFromEBIS3()
assertNotNull( voxelDimensions );
}

@Test
public void openOMEZarrFromS3WithCredentials()
{
System.out.println("openOMEZarrFromS3WithCredentials");
N5ImageData< ? > n5ImageData = new N5ImageData<>(
"https://s3.embl.de/mobie-credentials-test/test/images/ome-zarr/8kmont5.ome.zarr",
new String[]{ "4vJRUoUQZix2x7wPRlSy", "qtt7o93uv2PTvXSgYGMtoGtQkd3HsRqVH5XwitSf" });
VoxelDimensions voxelDimensions = n5ImageData.getSourcePair( 0 ).getB().getVoxelDimensions();
assertNotNull( voxelDimensions );
}

@Test
public void openOMEZarrFromS3WithCredentialsV2()
{
// This test uses the ImageDataOpener ( instead of directly N5ImageData )
System.out.println("openOMEZarrFromS3WithCredentialsV2");
ImageDataFormat imageDataFormat = ImageDataFormat.OmeZarrS3;
imageDataFormat.setS3SecretAndAccessKey( new String[]{ "4vJRUoUQZix2x7wPRlSy", "qtt7o93uv2PTvXSgYGMtoGtQkd3HsRqVH5XwitSf" } );
ImageData< ? > imageData = ImageDataOpener.open(
"https://s3.embl.de/mobie-credentials-test/test/images/ome-zarr/8kmont5.ome.zarr",
imageDataFormat,
new SharedQueue( 1 ) );
VoxelDimensions voxelDimensions = imageData.getSourcePair( 0 ).getB().getVoxelDimensions();
assertNotNull( voxelDimensions );
}
// @Test
// public void openOMEZarrFromS3WithCredentialsWithN5ImageData()
// {
// System.out.println("openOMEZarrFromS3WithCredentials");
// N5ImageData< ? > n5ImageData = new N5ImageData<>(
// "https://s3.embl.de/mobie-credentials-test/test/images/ome-zarr/8kmont5.ome.zarr",
// new String[]{ "4vJRUoUQZix2x7wPRlSy", "qtt7o93uv2PTvXSgYGMtoGtQkd3HsRqVH5XwitSf" });
// VoxelDimensions voxelDimensions = n5ImageData.getSourcePair( 0 ).getB().getVoxelDimensions();
// assertNotNull( voxelDimensions );
// }
//
// @Test
// public void openOMEZarrFromS3WithCredentialsWithImageDataOpener()
// {
// // This test uses the ImageDataOpener ( instead of directly N5ImageData )
// System.out.println("openOMEZarrFromS3WithCredentialsV2");
// ImageDataFormat imageDataFormat = ImageDataFormat.OmeZarrS3;
// imageDataFormat.setS3SecretAndAccessKey(
// new String[]{
// "4vJRUoUQZix2x7wPRlSy",
// "qtt7o93uv2PTvXSgYGMtoGtQkd3HsRqVH5XwitSf"
// } );
// ImageData< ? > imageData = ImageDataOpener.open(
// "https://s3.embl.de/mobie-credentials-test/test/images/ome-zarr/8kmont5.ome.zarr",
// imageDataFormat,
// new SharedQueue( 1 ) );
// VoxelDimensions voxelDimensions = imageData.getSourcePair( 0 ).getB().getVoxelDimensions();
// assertNotNull( voxelDimensions );
// }

@Test
public void openOMEZarrFromS3WithWrongCredentials()
Expand All @@ -70,13 +73,13 @@ public void openOMEZarrFromS3WithWrongCredentials()
N5ImageData< ? > n5ImageData = new N5ImageData<>(
"https://s3.embl.de/mobie-credentials-test/test/images/ome-zarr/8kmont5.ome.zarr",
new String[]{ "4vJRUoUQZix2x7wPRlSy", "wrongSecretKey" });
VoxelDimensions voxelDimensions = n5ImageData.getSourcePair( 0 ).getB().getVoxelDimensions();
System.out.println("Succeeded incorrectly.");
assertNotNull( n5ImageData.getSourcePair( 0 ).getB().getVoxelDimensions() );
System.out.println("Succeeded incorrectly; this should fail.");
fail();
}
catch ( Exception e )
{
System.out.println("Failed correctly.");
System.out.println("Failed correctly due to wrong credentials.");
assertTrue( true );
}
}
Expand All @@ -86,7 +89,7 @@ public static void main( String[] args )
ExecutorService exec = Executors.newCachedThreadPool();
exec.submit(() -> {new N5ImageDataTest().openOMEZarrFromS3();});
exec.submit(() -> {new N5ImageDataTest().openOMEZarrFromEBIS3();});
exec.submit(() -> {new N5ImageDataTest().openOMEZarrFromS3WithCredentials();});
//exec.submit(() -> {new N5ImageDataTest().openOMEZarrFromS3WithCredentialsWithN5ImageData();});
exec.submit(() -> {new N5ImageDataTest().openOMEZarrFromS3WithWrongCredentials();});
}
}

0 comments on commit 1ff6590

Please sign in to comment.