Skip to content

Conversation

@Faanbaria
Copy link
Contributor

@Faanbaria Faanbaria commented Oct 21, 2025

The executor kept running past the timeout limit. This happened because join() was called on stream jobs before checking if timeout occurred. Now we check for timeout first, then call join(). Updated tests to verify timeouts work correctly.


Type of the changes

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tests improvement
  • Refactoring

Checklist

  • The pull request has a description of the proposed change
  • I read the Contributing Guidelines before opening the pull request
  • The pull request uses develop as the base branch
  • Tests for the changes have been added
  • All new and existing tests passed
Additional steps for pull requests adding a new feature
  • An issue describing the proposed change exists
  • The pull request includes a link to the issue
  • The change was discussed and approved in the issue
  • Docs have been added / updated

@Faanbaria Faanbaria force-pushed the fatima/fix-executor-timeout branch from 8160efc to b3dac7f Compare October 21, 2025 09:09
@Faanbaria Faanbaria changed the title fix: prevent executor hanging on timeout fix: timeout not respected because join() called before timeout check Oct 21, 2025
Copy link
Contributor

@kpavlov kpavlov left a comment

Choose a reason for hiding this comment

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

Thank you, @Faanbaria

@Faanbaria Faanbaria force-pushed the fatima/fix-executor-timeout branch from 3cd4308 to f8444c5 Compare October 22, 2025 15:59
@Faanbaria Faanbaria force-pushed the fatima/fix-executor-timeout branch from f8444c5 to 2f0a157 Compare November 17, 2025 16:02
Removed duplicate sleep-only timeout tests. Added withTimeout to prevent
tests from hanging if fix breaks. Tests now verify partial output capture.
@Faanbaria Faanbaria force-pushed the fatima/fix-executor-timeout branch from 75b3a20 to cd0a2b3 Compare November 18, 2025 11:11
@Faanbaria Faanbaria requested a review from BLannoo November 18, 2025 14:36
@Faanbaria Faanbaria force-pushed the fatima/fix-executor-timeout branch from 40ab6f1 to 3f4d0ef Compare November 19, 2025 08:36
@Faanbaria Faanbaria merged commit 13442e8 into develop Nov 19, 2025
10 checks passed
@Faanbaria Faanbaria deleted the fatima/fix-executor-timeout branch November 19, 2025 08:47
@github-actions
Copy link

Qodana for JVM

1191 new problems were found

Inspection name Severity Problems
Check Kotlin and Java source code coverage 🔶 Warning 1180
Missing KDoc for public API declaration 🔶 Warning 11
@@ Code coverage @@
+ 71% total lines covered
16418 lines analyzed, 11797 lines covered
# Calculated according to the filters of your coverage tool

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

serge-p7v pushed a commit that referenced this pull request Dec 2, 2025
…#1005)

The executor kept running past the timeout limit. This happened because
join() was called on stream jobs before checking if timeout occurred.
Now we check for timeout first, then call join(). Updated tests to
verify timeouts work correctly.

---

#### Type of the changes
- [ ] New feature (non-breaking change which adds functionality)
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Tests improvement
- [ ] Refactoring

#### Checklist
- [x] The pull request has a description of the proposed change
- [x] I read the [Contributing
Guidelines](https://github.com/JetBrains/koog/blob/main/CONTRIBUTING.md)
before opening the pull request
- [x] The pull request uses **`develop`** as the base branch
- [x] Tests for the changes have been added
- [x] All new and existing tests passed

##### Additional steps for pull requests adding a new feature
- [ ] An issue describing the proposed change exists
- [ ] The pull request includes a link to the issue
- [ ] The change was discussed and approved in the issue
- [ ] Docs have been added / updated

---------

Co-authored-by: Bruno Lannoo <[email protected]>
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.

4 participants