diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c4035893..493a6a59 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - java: [ 11 ] + java: [ 11, 17, 21 ] steps: - uses: actions/checkout@v4 - name: Set up JDK ${{ matrix.java }} @@ -31,8 +31,7 @@ jobs: uses: gradle/actions/wrapper-validation@v3 - name: Build with Gradle - # Javadoc 11 won't work with our Javadocs, they need 21 - run: ./gradlew build -x javadoc + run: ./gradlew build - name: Upload test results if: always() @@ -42,7 +41,7 @@ jobs: path: "**/test-results/test/*.xml" test-javadocs: - name: Test Javadocs + name: Test Javadocs and dokka runs-on: ubuntu-latest timeout-minutes: 10 steps: diff --git a/sdk-testing/src/main/java/dev/restate/sdk/testing/ManualRestateRunner.java b/sdk-testing/src/main/java/dev/restate/sdk/testing/ManualRestateRunner.java index a2637d9b..7b6194ac 100644 --- a/sdk-testing/src/main/java/dev/restate/sdk/testing/ManualRestateRunner.java +++ b/sdk-testing/src/main/java/dev/restate/sdk/testing/ManualRestateRunner.java @@ -82,14 +82,16 @@ public class ManualRestateRunner } } - /** Run restate, run the embedded service endpoint server, and register the services. */ - public void start() {} - /** * @deprecated Use {@link #start()} instead. */ @Deprecated(forRemoval = true) public void run() { + this.start(); + } + + /** Run restate, run the embedded service endpoint server, and register the services. */ + public void start() { // Start listening the local server try { server.listen(0).toCompletionStage().toCompletableFuture().get(); diff --git a/sdk-testing/src/main/java/dev/restate/sdk/testing/RestateRunner.java b/sdk-testing/src/main/java/dev/restate/sdk/testing/RestateRunner.java index e9d08213..e70594a5 100644 --- a/sdk-testing/src/main/java/dev/restate/sdk/testing/RestateRunner.java +++ b/sdk-testing/src/main/java/dev/restate/sdk/testing/RestateRunner.java @@ -14,12 +14,12 @@ /** * Restate runner for JUnit 5. Example: * - *
{@code
- * @RegisterExtension
+ * 
+ * {@code @RegisterExtension}
  * private final static RestateRunner restateRunner = RestateRunnerBuilder.create()
  *         .withService(new MyService())
  *         .buildRunner();
- * }
+ *
* *

The runner will deploy the services locally, execute Restate as container using Testcontainers, and register the services. @@ -30,15 +30,14 @@ *

Use the annotations {@link RestateClient}, {@link RestateURL} and {@link RestateAdminClient} * to interact with the deployed server: * - *

{@code
- * @Test
- * void initialCountIsZero(@RestateClient Client client) {
+ * 
+ * {@code @Test}
+ * void initialCountIsZero({@code @RestateClient} Client client) {
  *     var client = CounterClient.fromClient(ingressClient, "my-counter");
  *
  *     // Use client as usual
  *     long response = client.get();
  *     assertThat(response).isEqualTo(0L);
- * }
  * }
*/ public class RestateRunner extends BaseRestateRunner implements BeforeAllCallback { @@ -50,7 +49,7 @@ public class RestateRunner extends BaseRestateRunner implements BeforeAllCallbac @Override public void beforeAll(ExtensionContext context) { - deployer.run(); + deployer.start(); context.getStore(NAMESPACE).put(DEPLOYER_KEY, deployer); } }