Skip to content

Add dev server downloader & runner to testing package - #2982

Open
Sushisource wants to merge 4 commits into
mainfrom
sj/dev-server-gradle
Open

Add dev server downloader & runner to testing package#2982
Sushisource wants to merge 4 commits into
mainfrom
sj/dev-server-gradle

Conversation

@Sushisource

@Sushisource Sushisource commented Jul 30, 2026

Copy link
Copy Markdown
Member

What changed

Added an experimental dev-server API to temporal-testing, including configurable CLI download/cache support, readiness checks, process ownership, TestWorkflowEnvironment integration, and JUnit rule/extension support.

Repository tests now use the same Java-owned server through -PtestServer=dev-server. Gradle only prepares and activates the profile, while CI and contributor documentation use the new commands. Server lifecycle coverage runs against the pinned real CLI.

Why?

This makes local dev-server ownership reusable by SDK users and tools such as flake verification, while keeping sdk-java tests on the same implementation instead of maintaining a separate Gradle process runner.

Breaking changes?

None. The unreleased useTemporalCli profile and preparation task were replaced without compatibility aliases.

Server PR

None.

Testing

  • temporal-testing tests and Javadocs
  • Java 11 dev-server profile test
  • Java 21 virtual-thread tests
  • Real-CLI lifecycle integration tests

@Sushisource
Sushisource requested a review from a team as a code owner July 30, 2026 22:43
@Sushisource Sushisource changed the title Download dev server via gradle Add dev server downloader & runner to testing package Jul 31, 2026
@Sushisource
Sushisource force-pushed the sj/dev-server-gradle branch from 4430dcc to 6c827c9 Compare July 31, 2026 22:41
* <pre>{@code
* TestWorkflowRule.newBuilder()
* .useDevServer(
* TemporalDevServerOptions.newBuilder().setDownloadVersion("1.7.2").build())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* TemporalDevServerOptions.newBuilder().setDownloadVersion("1.7.2").build())
* TemporalDevServerOptions.newBuilder().setDownloadVersion("v1.7.2").build())

Comment thread gradle/temporalCli.gradle

import java.util.concurrent.TimeUnit

abstract class TemporalDevServerTestService

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think it would be simpler to just move this into the SDK test rule?

}

/** Starts a dev server for the supplied namespace and options. */
public static TemporalDevServer start(String namespace, TemporalDevServerOptions options) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: could use some non null annotations

@Quinn-With-Two-Ns

Copy link
Copy Markdown
Contributor

We should make a follow up issue to update our docs and samples to show how to do this

}
this.useDevServer = true;
this.useExternalService = false;
this.target = null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we document these are mutually exclusive?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants