Skip to content

Support Standalone Activity client in temporal-testing#2916

Merged
maciejdudko merged 3 commits into
temporalio:masterfrom
444am:444am/test-env-activity-client
Jun 18, 2026
Merged

Support Standalone Activity client in temporal-testing#2916
maciejdudko merged 3 commits into
temporalio:masterfrom
444am:444am/test-env-activity-client

Conversation

@444am

@444am 444am commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

What was changed

Added ActivityClient support to temporal-testing, and updated README.
ℹ️ I understand that with this change, Standalone Activity would be still yet properly supported in local Test Server. However as the changes to that part would be mostly in temporal-test-server, I would like to keep this PR focusing on TestWorkflowEnvironment contract enrichment.

Why?

Standalone Activity tests had to manually construct an ActivityClient from service stubs and options. This PR makes standalone activity testing use the same test-environment API style as Workflow Client testing.

How was this tested:

See the new UT file

@444am 444am requested a review from a team as a code owner June 15, 2026 07:55

@maciejdudko maciejdudko left a comment

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.

Hi @444am, thank you for your contribution! The code looks great, no corrections needed except for a small change in README.md and removing TimeLockingActivityClientInterceptor class (see comments). In the interest of time, I'll apply these changes myself.

Comment thread temporal-testing/README.md Outdated
Comment on lines +38 to +40
`TestWorkflowEnvironment`, `TestWorkflowRule`, and `TestWorkflowExtension` provide clients connected
to the test service. Use `getWorkflowClient()` for Workflows and `getActivityClient()` for
Standalone Activities when the target Temporal service supports Standalone Activity APIs.

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.

Soon, every up-to-date Temporal server will have Standalone Activities supported and enabled by default; the last part will become dated very quickly.

Suggested change
`TestWorkflowEnvironment`, `TestWorkflowRule`, and `TestWorkflowExtension` provide clients connected
to the test service. Use `getWorkflowClient()` for Workflows and `getActivityClient()` for
Standalone Activities when the target Temporal service supports Standalone Activity APIs.
`TestWorkflowEnvironment`, `TestWorkflowRule`, and `TestWorkflowExtension` provide clients connected
to the test service. Use `getWorkflowClient()` for Workflows and `getActivityClient()` for
Standalone Activities.

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.

Time-skipping API is currently being reworked, and the test server doesn't support Standalone Activities yet. It means this interceptor is unusable currently and will likely remain unusable in its current form. I'd rather not include it in this PR, and have it added separately at a later date when the new time-skipping API are finalized.

TL;DR: remove this class.

@maciejdudko maciejdudko force-pushed the 444am/test-env-activity-client branch from d68054f to c846f16 Compare June 18, 2026 15:09
@maciejdudko maciejdudko enabled auto-merge (squash) June 18, 2026 15:10
@maciejdudko maciejdudko force-pushed the 444am/test-env-activity-client branch from c846f16 to 5633b89 Compare June 18, 2026 15:52
@maciejdudko maciejdudko merged commit 8e5ee33 into temporalio:master Jun 18, 2026
17 checks passed
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