Support Standalone Activity client in temporal-testing#2916
Conversation
maciejdudko
left a comment
There was a problem hiding this comment.
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.
| `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. |
There was a problem hiding this comment.
Soon, every up-to-date Temporal server will have Standalone Activities supported and enabled by default; the last part will become dated very quickly.
| `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. |
There was a problem hiding this comment.
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.
d68054f to
c846f16
Compare
c846f16 to
5633b89
Compare
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 onTestWorkflowEnvironmentcontract 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