Skip to content

Conversation

@bergundy
Copy link
Member

What was changed

  • Added support for ScheduleToStartTimeout and StartToCloseTimeout for Nexus operations in the Java SDK and test server.
  • In the test server:
    • Cap secondary timeouts to scheduleToClose timeout
    • Support all three timeout types in timeoutNexusOperation()
    • Calculate OPERATION_TIMEOUT header dynamically in pollNexusTaskQueue() and use the correct header format
  • Added tests for the new functionality

NOTE: Do not merge until the API is tagged.

@bergundy bergundy requested a review from a team as a code owner January 14, 2026 00:57
@Quinn-With-Two-Ns
Copy link
Contributor

Can we add some tests like we have for activity

to verify the parameter is properly wired through and respected

@bergundy
Copy link
Member Author

Can we add some tests like we have for activity

to verify the parameter is properly wired through and respected

We have coverage in NexusWorkflowTest.java.

Assert.assertTrue("OPERATION_TIMEOUT should be positive", operationTimeoutMs > 0);

// Sleep longer than schedule-to-start timeout to trigger the timeout
Thread.sleep(2000);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be able to use testWorkflowRule.sleep here to avoid waiting real time in the time skipping test server, but I would prefer the test not use a sleep and just wait for the condition to be true. Should be possible to wait for the operation to fail by looking at the workflow describe output no?

@Quinn-With-Two-Ns
Copy link
Contributor

We have coverage in NexusWorkflowTest.java.

NexusWorkflowTest.java doesn't use the Java SDK so it is not providing coverage of the SDK

@Quinn-With-Two-Ns
Copy link
Contributor

Quinn-With-Two-Ns commented Jan 14, 2026

you also need to update constructPendingNexusOperationInfo in the test server I think, unless I missed that.

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