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

Sleep for 2ms to avoid time-sensitive test failures #482

Merged
merged 3 commits into from
Aug 23, 2023

Conversation

LiranCohen
Copy link
Member

@LiranCohen LiranCohen commented Aug 21, 2023

Experienced this issue and tracked it down:
#481

This might be some sort of precision bug within Temporal itself, I'm not really sure how various NodeJS systems handle time precision.

But in these cases there simply needs to be a gap in time for the testing logic, increasing the gap by an additional millisecond will make sure these tests are accurate.

thehenrytsai
thehenrytsai previously approved these changes Aug 21, 2023
Copy link
Member

@thehenrytsai thehenrytsai left a comment

Choose a reason for hiding this comment

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

🙏
I wonder if it's worthwhile introducing a common util method like minimalSleep().

@LiranCohen
Copy link
Member Author

@thehenrytsai I really like that idea, let me put that in this PR so we can set precedent.

Copy link
Member

@thehenrytsai thehenrytsai left a comment

Choose a reason for hiding this comment

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

🙏 🙏 🙏

@LiranCohen LiranCohen merged commit 460c19b into main Aug 23, 2023
3 checks passed
@LiranCohen LiranCohen deleted the lirancohen/sleep-during-tests branch August 23, 2023 03:11
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.

None yet

2 participants