File tree Expand file tree Collapse file tree
src/test/java/dev/zarr/zarrjava/store Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5959 MAVEN_OPTS : " -Xmx6g"
6060 run : |
6161 if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
62- mvn --no-transfer-progress test -DargLine="-Xmx6g"
62+ mvn --no-transfer-progress test -DargLine="-Xmx6g" -DrunS3Tests=true
6363 else
64- # Skip S3 tests on Windows/macOS where the service isn't running (labeled with @Tag("s3"))
65- mvn --no-transfer-progress test -DargLine="-Xmx6g" -DexcludedGroups="s3"
64+ mvn --no-transfer-progress test -DargLine="-Xmx6g"
6665 fi
6766 - name : Assemble JAR
6867 run : mvn package -DskipTests
Original file line number Diff line number Diff line change 33import dev .zarr .zarrjava .ZarrException ;
44import org .junit .jupiter .api .Assertions ;
55import org .junit .jupiter .api .BeforeAll ;
6- import org .junit .jupiter .api .Tag ;
76import org .junit .jupiter .api .Test ;
7+ import org .junit .jupiter .api .condition .EnabledIfSystemProperty ;
88import software .amazon .awssdk .auth .credentials .AwsBasicCredentials ;
99import software .amazon .awssdk .auth .credentials .StaticCredentialsProvider ;
1010import software .amazon .awssdk .core .sync .RequestBody ;
3030 * docker run -p 9090:9090 -p 9191:9191 -e "initialBuckets=zarr-test-bucket" adobe/s3mock:3.11.0
3131 * </pre>
3232 */
33- @ Tag ( "s3 " )
33+ @ EnabledIfSystemProperty ( named = "runS3Tests" , matches = "true " )
3434public class S3StoreTest extends WritableStoreTest {
3535
3636 String s3Endpoint = "http://localhost:9090" ;
3737 String bucketName = "zarr-test-bucket" ;
3838 S3Client s3Client ;
3939 String testDataKey = "testData" ;
4040 S3Store s3Store ;
41+
4142 @ BeforeAll
4243 void setUpS3Client () throws ZarrException , IOException {
4344 s3Client = S3Client .builder ()
Original file line number Diff line number Diff line change @@ -97,9 +97,9 @@ public void testGetWithStartEnd() {
9797 buffer .get (actualBytes , 0 , 10 );
9898 Assertions .assertArrayEquals (expectedBytes , actualBytes );
9999
100- buffer = storeHandle .read (size - 10 );
100+ buffer = storeHandle .read (size - 10 );
101101 Assertions .assertEquals (10 , buffer .remaining ());
102- fullBuffer .position ((int )(size - 10 ));
102+ fullBuffer .position ((int ) (size - 10 ));
103103 fullBuffer .get (expectedBytes , 0 , 10 );
104104 buffer .get (actualBytes , 0 , 10 );
105105 Assertions .assertArrayEquals (expectedBytes , actualBytes );
You can’t perform that action at this time.
0 commit comments