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

[TEST] TFrontendServiceSuite - close expired operations #6069

Closed
wants to merge 3 commits into from

Conversation

cxzl25
Copy link
Contributor

@cxzl25 cxzl25 commented Feb 21, 2024

🔍 Description

Issue References 🔗

This pull request fixes #

Describe Your Solution 🔧

Remove unnecessary waits

Types of changes 🔖

  • 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 📝

Be nice. Be informative.

@cxzl25 cxzl25 marked this pull request as draft February 21, 2024 04:42
@codecov-commenter
Copy link

codecov-commenter commented Feb 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3a76507) 61.11% compared to head (5895d09) 61.07%.
Report is 3 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

@cxzl25 cxzl25 marked this pull request as ready for review February 21, 2024 08:52
@cxzl25 cxzl25 self-assigned this Feb 21, 2024
@cxzl25 cxzl25 requested a review from pan3793 February 21, 2024 08:53
@@ -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))) {
Copy link
Contributor Author

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.

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()
}

@pan3793 pan3793 added this to the v1.8.2 milestone Feb 21, 2024
@pan3793 pan3793 closed this in 43b5431 Feb 21, 2024
pan3793 pushed a commit that referenced this pull request Feb 21, 2024
# 🔍 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 <sychen@ctrip.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
(cherry picked from commit 43b5431)
Signed-off-by: Cheng Pan <chengpan@apache.org>
@pan3793
Copy link
Member

pan3793 commented Feb 21, 2024

Thanks, merged to master/1.8

zhaohehuhu pushed a commit to zhaohehuhu/incubator-kyuubi that referenced this pull request Mar 21, 2024
…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 <sychen@ctrip.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants