@@ -83,28 +83,12 @@ public void testHttpStore() throws IOException, ZarrException {
8383 }
8484
8585 @ ParameterizedTest
86- @ CsvSource ({
87- "false,MemoryStore" ,
88- "false,ConcurrentMemoryStore" ,
89- "true,ConcurrentMemoryStore" ,
90- })
91- public void testMemoryStoreV3 (boolean useParallel , String storeType ) throws ZarrException , IOException {
86+ @ CsvSource ({"false" , "true" ,})
87+ public void testMemoryStoreV3 (boolean useParallel ) throws ZarrException , IOException {
9288 int [] testData = new int [1024 * 1024 ];
9389 Arrays .setAll (testData , p -> p );
9490
95- StoreHandle storeHandle ;
96- switch (storeType ) {
97- case "ConcurrentMemoryStore" :
98- storeHandle = new ConcurrentMemoryStore ().resolve ();
99- break ;
100- case "MemoryStore" :
101- storeHandle = new MemoryStore ().resolve ();
102- break ;
103- default :
104- throw new IllegalArgumentException ("Unknown store type: " + storeType );
105- }
106-
107- Group group = Group .create (storeHandle );
91+ Group group = Group .create (new MemoryStore ().resolve ());
10892 Array array = group .createArray ("array" , b -> b
10993 .withShape (1024 , 1024 )
11094 .withDataType (DataType .UINT32 )
@@ -124,28 +108,12 @@ public void testMemoryStoreV3(boolean useParallel, String storeType) throws Zarr
124108 }
125109
126110 @ ParameterizedTest
127- @ CsvSource ({
128- "false,MemoryStore" ,
129- "false,ConcurrentMemoryStore" ,
130- "true,ConcurrentMemoryStore" ,
131- })
132- public void testMemoryStoreV2 (boolean useParallel , String storeType ) throws ZarrException , IOException {
111+ @ CsvSource ({"false" , "true" ,})
112+ public void testMemoryStoreV2 (boolean useParallel ) throws ZarrException , IOException {
133113 int [] testData = new int [1024 * 1024 ];
134114 Arrays .setAll (testData , p -> p );
135115
136- StoreHandle storeHandle ;
137- switch (storeType ) {
138- case "ConcurrentMemoryStore" :
139- storeHandle = new ConcurrentMemoryStore ().resolve ();
140- break ;
141- case "MemoryStore" :
142- storeHandle = new MemoryStore ().resolve ();
143- break ;
144- default :
145- throw new IllegalArgumentException ("Unknown store type: " + storeType );
146- }
147-
148- dev .zarr .zarrjava .v2 .Group group = dev .zarr .zarrjava .v2 .Group .create (storeHandle );
116+ dev .zarr .zarrjava .v2 .Group group = dev .zarr .zarrjava .v2 .Group .create (new MemoryStore ().resolve ());
149117 dev .zarr .zarrjava .v2 .Array array = group .createArray ("array" , b -> b
150118 .withShape (1024 , 1024 )
151119 .withDataType (dev .zarr .zarrjava .v2 .DataType .UINT32 )
0 commit comments