Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/service_test_redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ jobs:
- name: Test
shell: bash
working-directory: bindings/java
run: ./mvnw test -Dtest=org.apache.opendal.test.behavior.RedisTest -Dcargo-build.features=services-redis
run: ./mvnw test -Dgroups="services_redis" -Dcargo-build.features=services-redis
env:
OPENDAL_REDIS_TEST: on
OPENDAL_REDIS_ENDPOINT: tcp://127.0.0.1:6379
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ jobs:
- name: Test
shell: bash
working-directory: bindings/java
run: ./mvnw test -Dtest=org.apache.opendal.test.behavior.S3Test
run: ./mvnw test -Dgroups="services_s3"
env:
OPENDAL_S3_TEST: on
OPENDAL_S3_BUCKET: test
Expand Down
12 changes: 12 additions & 0 deletions bindings/java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,20 @@ You can run service tests of enabled with the following command:
./mvnw test -Dtest=org.apache.opendal.behavior.FsTest # replace with the certain service tests
```

Or:

```shell
./mvnw test -Dgroups="services_fs" # replace with the certain service tests
```

Remember to enable the necessary features via `-Dcargo-build.features=services-xxx` when running specific service test:

```shell
./mvnw test -Dtest=org.apache.opendal.behavior.RedisTest -Dcargo-build.features=services-redis
```

Or:

```shell
./mvnw test -Dgroups="services_redis" -Dcargo-build.features=services-redis
```
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
import org.assertj.core.util.Files;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.condition.EnabledIf;

@Tag("services_memory")
@Slf4j
class MemoryTest extends AbstractBehaviorTest {
public MemoryTest() {
Expand All @@ -43,6 +45,7 @@ private static Map<String, String> defaultSchemeConfig() {
}
}

@Tag("services_fs")
@Slf4j
class FsTest extends AbstractBehaviorTest {
public FsTest() {
Expand All @@ -64,6 +67,7 @@ private static Map<String, String> schemeConfig() {
}
}

@Tag("services_redis")
@EnabledIf("enabled")
class RedisTest extends AbstractBehaviorTest {
public RedisTest() {
Expand All @@ -75,6 +79,7 @@ private static boolean enabled() {
}
}

@Tag("services_s3")
@EnabledIf("enabled")
class S3Test extends AbstractBehaviorTest {
public S3Test() {
Expand Down