Skip to content

Conversation

@vr-varad
Copy link
Contributor

@vr-varad vr-varad commented Nov 18, 2025

Fixes #143

@vr-varad
Copy link
Contributor Author

@maxdml Kindly review at your convenience.
Would you like me to add tests as well?

@maxdml
Copy link
Collaborator

maxdml commented Nov 20, 2025

@maxdml Kindly review at your convenience. Would you like me to add tests as well?

Thanks Varad, yes let's fix the TestWorkflowQueues/QueueWorkflowDLQ test. All the handles calls to GetResult should yield the max retries error now. (Because the mere fact of attempting to recover the workflow moves it to the DLQ and sets the error.)

result, err := handle.GetResult()
require.NoError(t, err, "failed to get result from recovered workflow handle")
assert.Equal(t, "test-input", result, "expected result to be 'test-input'")
result, _ := handle.GetResult()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@maxdml I made changes in the test, but I am not sure how to handle result err.

Copy link
Collaborator

Choose a reason for hiding this comment

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

You have to type assert it into a DBOSError and then you can check it's Is method with the new error code.

We don't care about the result, we're just interested in checking the error. All the handles should return an error.

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.

Handle max retries in awaitWorkflowResult

2 participants