yugabyte / yugabyte/yugabyte-db
[YSQL] Failing test: org.yb.ysqlconnmgr.TestStatsAndMetrics#testControlPoolConnections on 2025.1
- Dominant language
- C
- Stars
- 10.5k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
Jira Link: [DB-23634](https://yugabyte.atlassian.net/browse/DB-23634)
## Description
`org.yb.ysqlconnmgr.TestStatsAndMetrics#testControlPoolConnections` fails
consistently (not just flakily) on the `2025.1` branch. It is being muted
there for now.
Reproduce with:
ybd release --java-test 'org.yb.ysqlconnmgr.TestStatsAndMetrics#testControlPoolConnections'
```
15:53:31.620 (Time-limited test) [ERROR - org.yb.AssertionWrappers.logError(AssertionWrappers.java:41)] Assertion error:
java.lang.AssertionError: null
at org.junit.Assert.fail(Assert.java:87)
at org.junit.Assert.assertTrue(Assert.java:42)
at org.junit.Assert.assertNotNull(Assert.java:713)
at org.junit.Assert.assertNotNull(Assert.java:723)
at org.yb.AssertionWrappers.lambda$assertNotNull$42(AssertionWrappers.java:648)
at org.yb.AssertionWrappers.wrapAssertion(AssertionWrappers.java:46)
at org.yb.AssertionWrappers.assertNotNull(AssertionWrappers.java:648)
at org.yb.ysqlconnmgr.TestStatsAndMetrics.testAvgWaitTime(TestStatsAndMetrics.java:98)
at org.yb.ysqlconnmgr.TestStatsAndMetrics.testControlPoolConnections(TestStatsAndMetrics.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:288)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:282)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:748)
```
`TestStatsAndMetrics.java:98` on 2025.1 is the first `assertNotNull(pool)` in
`testAvgWaitTime()`: the control pool is not yet present in the very first
stats fetch, which `testControlPoolConnections` makes with no sleep at all.
That is what #29457 fixed, by treating a missing pool as
`avg_wait_time_ns == 0`. The fix landed on master and was backported to
2024.2, 2025.2, and 2026.1 -- but not to 2025.1. The later follow-up #33084
(record the first `avg_wait_time_ns` sample) is likewise absent from 2025.1.
Suggested fix: backport #29457 to 2025.1, and #33084 along with it.
## Issue Type
kind/failing-test
## Warning: Please confirm that this issue does not contain any sensitive information
- [x] I confirm this issue does not contain any sensitive information.
[DB-23634]: https://yugabyte.atlassian.net/browse/DB-23634?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with org.yb.ysqlconnmgr.TestStatsAndMetrics, especially testAvgWaitTime() and testControlPoolConnections(), then run the provided ybd release --java-test command on the 2025.1 branch. Compare the backports of #29457 and #33084, apply both fixes, and verify that the test passes without the missing control-pool assertion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 62/100