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

Removed heardcoded 10 second timeout for an activity under test #1957

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

mfateev
Copy link
Member

@mfateev mfateev commented Dec 16, 2023

What was changed

Removed hardcoded 10-second timeout for TestActivityEnvironment.

Why?

We want to support unit testing activities that take longer than 10 seconds.

Reported at https://community.temporal.io/t/activities-run-in-tests-using-testactivityenvironment-intermittently-fails-with-java-util-concurrent-timeoutexception/10397/3

@mfateev mfateev requested a review from a team as a code owner December 16, 2023 05:20
@@ -363,17 +363,13 @@ private Result executeActivity(
localActivity));

try {
// 10 seconds is just a "reasonable" wait to not make an infinite waiting
return activityFuture.get(10, TimeUnit.SECONDS);
return activityFuture.get();
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't the timeout be based on the activities timeout?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think anyone is using real activity timeouts in the TestActivityEnvironment.

@mfateev mfateev merged commit 440965b into temporalio:master Dec 19, 2023
4 checks passed
@mfateev mfateev deleted the test-activity-timeout branch December 19, 2023 01:30
@lr-josephcho
Copy link

Just wondering, when would this change be available? If it's on the next release, would it be possible to know approx. when that would be?

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.

3 participants