-
Notifications
You must be signed in to change notification settings - Fork 148
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
Test environment hangs if activity is not defined, and scheduleToStartTimeout
is ignored
#2305
Comments
scheduleToStartTimeout
is ignored
Can confirm Test server does support sdk-java/temporal-sdk/src/test/java/io/temporal/workflow/activityTests/ActivityTimeoutTest.java Line 282 in b45e40d
|
Ah, really? Looking at this blog post, The documentation says this:
So if the activity task remains in the task queue (despite workers listening), why wouldn't the If what you are saying is true, how would I configure the case in which my workflow can take hours or days of real time (and in my test environment I would use time skipping), but if its not started very quickly I want to bail out? |
You would use |
Ok. Isn't that weird and confusing? If an activity type is not registered and therefore an activity is scheduled, but not started, why would |
Closing this because the behavior is working as designed (though the design seems questionable). I've opened this community form post to explore this topic. |
I think there is a misunderstanding here, to be clear, If an activity type is not registered, but was scheduled it will still be started if any worker is listenting on the task queue. This is how the protocol between the Temporal worker and server works and is important to safely roll out new Workflow/Activity types. Workers poll for work by task queue , not by activity type, if a worker is listening on a task queue it can get any tasks assigned to that task queue. Once a worker picks up a task the server considers that task as started. If the worker does not know how to handle that activity type then the worker will fail that activity attempt, but from the servers perspective the task was started. This behaviour is important when rolling out new types of activities/workflows that old workers may not understand |
Thank you for the explanation about what "started" actually means. I think it would be helpful if the docs included this information because this technical definition of "started" would not match most people's mental model of an activity being "started". |
Is your feature request related to a problem? Please describe.
When using the Temporal test environment, if an activity is run which is not registered, the test hangs, and apparently forever. I've set the
scheduleToStartTimeout
to a few seconds but apparently the test Temporal server ignores it.Describe the solution you'd like
Tests should fail immediately when an activity is called that is not registered. Alternatively, or in addition, the
scheduleToStartTimeout
should be respected.Describe alternatives you've considered
None
Additional context
Temporal SDK 1.26.1
The text was updated successfully, but these errors were encountered: