-
Notifications
You must be signed in to change notification settings - Fork 924
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
[TEST] TFrontendServiceSuite - close expired operations #6069
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6069 +/- ##
============================================
- Coverage 61.11% 61.07% -0.04%
Complexity 23 23
============================================
Files 623 623
Lines 37206 37206
Branches 5041 5041
============================================
- Hits 22737 22724 -13
- Misses 12016 12027 +11
- Partials 2453 2455 +2 ☔ View full report in Codecov by Sentry. |
@@ -557,9 +557,7 @@ class TFrontendServiceSuite extends KyuubiFunSuite { | |||
assert(cancelOpResp.getStatus.getStatusCode === TStatusCode.SUCCESS_STATUS) | |||
assert(sessionManager.getOpenSessionCount === 1) | |||
assert(session.lastIdleTime === 0) | |||
eventually(timeout(Span(60, Seconds)), interval(Span(1, Seconds))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the execution speed is very fast, the access time may be equal. This waiting may cause the operation and session to be cleared in advance, and subsequent asserts will fail.
kyuubi/kyuubi-common/src/main/scala/org/apache/kyuubi/session/SessionManager.scala
Lines 311 to 318 in fbe80ac
if (session.lastAccessTime + session.sessionIdleTimeoutThreshold <= current && | |
session.getNoOperationTime > session.sessionIdleTimeoutThreshold) { | |
info(s"Closing session ${session.handle.identifier} that has been idle for more" + | |
s" than ${session.sessionIdleTimeoutThreshold} ms") | |
closeSession(session.handle) | |
} else { | |
session.closeExpiredOperations() | |
} |
# 🔍 Description ## Issue References 🔗 This pull request fixes # ## Describe Your Solution 🔧 Remove unnecessary waits ## Types of changes 🔖 - [x] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan 🧪 #### Behavior Without This Pull Request ⚰️ Flasy test #### Behavior With This Pull Request 🎉 GA #### Related Unit Tests TFrontendServiceSuite - "close expired operations" --- # Checklist 📝 - [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #6069 from cxzl25/fix_TF_close_op_test. Closes #6069 5895d09 [sychen] trigger test a01f67c [sychen] trigger test d67f2ea [sychen] test Authored-by: sychen <[email protected]> Signed-off-by: Cheng Pan <[email protected]> (cherry picked from commit 43b5431) Signed-off-by: Cheng Pan <[email protected]>
Thanks, merged to master/1.8 |
…rations # 🔍 Description ## Issue References 🔗 This pull request fixes # ## Describe Your Solution 🔧 Remove unnecessary waits ## Types of changes 🔖 - [x] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan 🧪 #### Behavior Without This Pull Request ⚰️ Flasy test #### Behavior With This Pull Request 🎉 GA #### Related Unit Tests TFrontendServiceSuite - "close expired operations" --- # Checklist 📝 - [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes apache#6069 from cxzl25/fix_TF_close_op_test. Closes apache#6069 5895d09 [sychen] trigger test a01f67c [sychen] trigger test d67f2ea [sychen] test Authored-by: sychen <[email protected]> Signed-off-by: Cheng Pan <[email protected]>
🔍 Description
Issue References 🔗
This pull request fixes #
Describe Your Solution 🔧
Remove unnecessary waits
Types of changes 🔖
Test Plan 🧪
Behavior Without This Pull Request ⚰️
Flasy test
Behavior With This Pull Request 🎉
GA
Related Unit Tests
TFrontendServiceSuite - "close expired operations"
Checklist 📝
Be nice. Be informative.