Skip to content

Commit 91e5e3d

Browse files
committed
fix ReadOnlyZipStoreTest.testReadFromBufferedZipStore and S3StoreTest>StoreTest.testExists
1 parent 2897f0a commit 91e5e3d

2 files changed

Lines changed: 9 additions & 11 deletions

File tree

src/test/java/dev/zarr/zarrjava/store/ReadOnlyZipStoreTest.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,8 @@ public void testReadFromBufferedZipStore() throws ZarrException, IOException {
104104
"array/c/0/0",
105105
"array/c/0/1",
106106
"zarr.json",
107-
"array",
108107
"array/c/1/0",
109-
"array/c/1",
110-
"array/c/0",
111-
"array/zarr.json",
112-
"array/c"
108+
"array/zarr.json"
113109
));
114110

115111
Set<String> actualKeys = readOnlyZipStore.resolve("subgroup").list()

src/test/java/dev/zarr/zarrjava/store/S3StoreTest.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ public class S3StoreTest extends WritableStoreTest {
3737
String bucketName = "zarr-test-bucket";
3838
S3Client s3Client;
3939
String testDataKey = "testData";
40-
40+
S3Store s3Store;
4141
@BeforeAll
42-
void setUpS3Client() {
42+
void setUpS3Client() throws ZarrException, IOException {
4343
s3Client = S3Client.builder()
4444
.endpointOverride(URI.create(s3Endpoint))
4545
.region(Region.US_EAST_1) // required, but ignored
@@ -62,6 +62,9 @@ void setUpS3Client() {
6262
} catch (Exception e) {
6363
throw new RuntimeException(e);
6464
}
65+
// Write a test group to the S3 store
66+
s3Store = new S3Store(s3Client, bucketName, "storeWithArrays");
67+
writeTestGroupV3(s3Store.resolve(), false);
6568
}
6669

6770
@Test
@@ -100,10 +103,9 @@ StoreHandle storeHandleWithoutData() {
100103
return new S3Store(s3Client, bucketName, "").resolve("nonexistent_key");
101104
}
102105

106+
103107
@Override
104-
Store storeWithArrays() throws ZarrException, IOException {
105-
S3Store s3Store = new S3Store(s3Client, bucketName, "");
106-
writeTestGroupV3(s3Store.resolve("array"), false);
107-
return s3Store;
108+
Store storeWithArrays() {
109+
return new S3Store(s3Client, bucketName, "storeWithArrays");
108110
}
109111
}

0 commit comments

Comments
 (0)