Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support robfig style cron defs in TestWorkflowEnvironment #341

Open
skrul opened this issue Aug 31, 2020 · 1 comment
Open

Support robfig style cron defs in TestWorkflowEnvironment #341

skrul opened this issue Aug 31, 2020 · 1 comment
Labels
enhancement User experience

Comments

@skrul
Copy link

skrul commented Aug 31, 2020

Expected Behavior

I have a cron workflow that uses the cron expression "@every 30s". This works fine when run against a temporal server, however, it fails when using the workflow unit test scaffolding.

Actual Behavior

com.xxx.runner.WorkflowTestRunnerStarterTest > run FAILED
    io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Invalid cron expression "@every 30s": Cron expression contains 2 parts but we expect one of [5]
        at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:244)
        at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:225)
        at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:142)
        at io.temporal.api.workflowservice.v1.WorkflowServiceGrpc$WorkflowServiceBlockingStub.startWorkflowExecution(WorkflowServiceGrpc.java:2613)
        at io.temporal.internal.external.GenericWorkflowClientExternalImpl.lambda$start$0(GenericWorkflowClientExternalImpl.java:86)
        at io.temporal.internal.common.GrpcRetryer.retryWithResult(GrpcRetryer.java:127)
        at io.temporal.internal.external.GenericWorkflowClientExternalImpl.start(GenericWorkflowClientExternalImpl.java:80)
        at io.temporal.internal.sync.WorkflowStubImpl.startWithOptions(WorkflowStubImpl.java:155)
        at io.temporal.internal.sync.WorkflowStubImpl.start(WorkflowStubImpl.java:267)
        at io.temporal.internal.sync.TestWorkflowEnvironmentInternal$TimeLockingInterceptor$TimeLockingWorkflowStub.start(TestWorkflowEnvironmentInternal.java:230)
        at io.temporal.internal.sync.WorkflowInvocationHandler$StartWorkflowInvocationHandler.invoke(WorkflowInvocationHandler.java:242)
        at io.temporal.internal.sync.WorkflowInvocationHandler.invoke(WorkflowInvocationHandler.java:178)
        at com.sun.proxy.$Proxy29.run(Unknown Source)
        at io.temporal.internal.sync.WorkflowClientInternal.start(WorkflowClientInternal.java:220)
        at io.temporal.client.WorkflowClient.start(WorkflowClient.java:238)
        at com.xxx.runner.WorkflowTestRunnerStarter.start(WorkflowTestRunnerStarter.java:52)
        at com.xxx.runner.WorkflowTestRunnerStarterTest.run(WorkflowTestRunnerStarterTest.java:50)```

## Specifications

  - Version: temporal java client 0.27.0
@wxing1292 wxing1292 transferred this issue from temporalio/temporal Feb 11, 2021
@Spikhalskiy
Copy link
Contributor

@Spikhalskiy Spikhalskiy changed the title io.temporal.internal.testservice.StateMachines.startWorkflow fails for cron workflow Support robfig style cron defs in TestWorkflowEnvironment Jun 29, 2022
@Spikhalskiy Spikhalskiy added the feature Short-term feature label Jun 29, 2022
@Quinn-With-Two-Ns Quinn-With-Two-Ns added enhancement User experience and removed feature Short-term feature labels May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement User experience
Projects
None yet
Development

No branches or pull requests

3 participants