Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Quinn-With-Two-Ns
Copy link
Contributor

@Quinn-With-Two-Ns Quinn-With-Two-Ns commented Mar 31, 2025

Add support for start delay to the time skipping test server.

closes #1692

@Quinn-With-Two-Ns Quinn-With-Two-Ns marked this pull request as ready for review March 31, 2025 03:08
@Quinn-With-Two-Ns Quinn-With-Two-Ns requested a review from a team as a code owner March 31, 2025 03:08
@Quinn-With-Two-Ns Quinn-With-Two-Ns changed the title Add support start delay Add support for start delay to the time skipping test server Mar 31, 2025
Comment on lines 60 to 64
long start = testWorkflowRule.getTestEnvironment().currentTimeMillis();
stubF.func();
long end = testWorkflowRule.getTestEnvironment().currentTimeMillis();
// Assert that the workflow took at least 5 seconds to start
assertEquals(5000, end - start, 1000);
Copy link
Member

@cretz cretz Mar 31, 2025

Choose a reason for hiding this comment

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

Can you confirm just in this comment thread that if time skipping is not enabled/uinlocked, this waits the actual system amount of time? Understood if not practical to write such a test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that was what this test was supposed to do, but I shouldn't have used the test environments time

@Quinn-With-Two-Ns Quinn-With-Two-Ns merged commit c9a1502 into temporalio:master Mar 31, 2025
8 checks passed
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.

Implement workflow_start_delay in test server
2 participants