apache / apache/kyuubi

[TEST] SessionsResourceSuite: - open/close and count session *** FAILED ***

Open
#5,349 1 comment 0 reactions 0 assignees View on GitHub
kind:test priority:minor
Dominant language
Scala
Stars
2.4k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

### Search before asking

- [X] I have searched in the [issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) and found no similar issues.

### What kind of test improve?

- [X] Fix flaky tests.
- [ ] Fix bug in tests.
- [ ] Increase test coverage.
- [ ] Other kinds of test improve.

### Describe the issues of the existing tests or improvements for new tests

https://github.com/apache/kyuubi/actions/runs/6438768905/job/17485664973?pr=5336

```
SessionsResourceSuite:
- open/close and count session *** FAILED ***
1 equaled 1, but 0 did not equal 1 (SessionsResourceSuite.scala:65)
- getSessionList *** FAILED ***
List(Map("duration" -> 0, "sessionType" -> "INTERACTIVE", "identifier" -> "bfe26bd7-9010-40f8-beed-3b125f3be756", "createTime" -> 1696651764791, "ipAddr" -> "127.0.0.1", "exception" -> "", "kyuubiInstance" -> "localhost:38463", "idleTime" -> 61, "engineId" -> "", "conf" -> Map("kyuubi.session.real.user" -> "anonymous", "testConfig" -> "testValue", "kyuubi.client.ipAddress" -> "127.0.0.1", "kyuubi.session.connection.url" -> "localhost:38463", "kyuubi.server.ipAddress" -> "localhost"), "user" -> "anonymous")) was not empty (SessionsResourceSuite.scala:104)
```

### Are you willing to submit PR?

- [ ] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to improve.
- [ ] No. I cannot submit a PR at this time.

Contributor guide

Open the contributing guide

Research direction

Start with SessionsResourceSuite.scala, especially the failing assertions at lines 65 and 104, and reproduce the failures from the linked GitHub Actions run. Determine why the open/close count and session-list assertions are flaky, then make the suite pass reliably with the expected count and an empty list.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.