Flaky test LogAlertSocketTest.testFailOverSingleHost()
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.3k
- Forks
- 1.6k
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 28
Description
Describe the bug
Failed for mac-other in https://github.com/questdb/questdb/pull/3803
Logs:
2023-10-03T14:10:23.704639Z I i.q.t.TestListener >>>> io.questdb.test.log.LogAlertSocketTest.testFailOverSingleHost
2023-10-03T14:10:28.715938Z E i.q.t.l.MockAlertTarget
java.net.SocketTimeoutException: Accept timed out
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:474)
at java.net.ServerSocket.implAccept(ServerSocket.java:565)
at java.net.ServerSocket.accept(ServerSocket.java:533)
at io.questdb.test.log.MockAlertTarget.run(MockAlertTarget.java:75)
2023-10-03T14:10:28.723986Z I i.q.t.l.LogAlertSocketTest Added alert manager [0]: 127.0.0.1 (127.0.0.1):49430
2023-10-03T14:10:28.726035Z I i.q.t.l.LogAlertSocketTest Could not connect with [0] 127.0.0.1:49430 [errno=61]
2023-10-03T14:10:28.726139Z I i.q.t.l.LogAlertSocketTest Failing over from [0] 127.0.0.1:49430 to [0] 127.0.0.1:49430 with a delay of 250 millis (as it is the same alert manager)
2023-10-03T14:10:29.029266Z I i.q.t.l.LogAlertSocketTest Could not connect with [0] 127.0.0.1:49430 [errno=61]
2023-10-03T14:10:29.029323Z I i.q.t.l.LogAlertSocketTest Failing over from [0] 127.0.0.1:49430 to [0] 127.0.0.1:49430 with a delay of 250 millis (as it is the same alert manager)
2023-10-03T14:10:29.284991Z I i.q.t.l.LogAlertSocketTest Could not connect with [0] 127.0.0.1:49430 [errno=61]
2023-10-03T14:10:29.285039Z I i.q.t.l.LogAlertSocketTest None of the configured alert managers are accepting alerts.
Giving up sending after 2 attempts: [POST /api/v1/alerts HTTP/1.1
Host: 127.0.0.1
User-Agent: QuestDB/LogAlert
Accept: /
Content-Type: application/json
Content-Length: 14
Something
]
]
2023-10-03T14:10:29.289452Z E i.q.t.TestListener ***** Test Failed *****io.questdb.test.log.LogAlertSocketTest.testFailOverSingleHost duration_ms=5585 :
java.lang.AssertionError
at org.junit.Assert.fail(Assert.java:87)
at org.junit.Assert.assertTrue(Assert.java:42)
at org.junit.Assert.assertTrue(Assert.java:53)
at io.questdb.test.log.LogAlertSocketTest.lambda$testFailOverSingleHost$6(LogAlertSocketTest.java:192)
at io.questdb.test.tools.TestUtils.assertMemoryLeak(TestUtils.java:568)
at io.questdb.test.log.LogAlertSocketTest.testFailOverSingleHost(LogAlertSocketTest.java:168)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:566)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.lang.Thread.run(Thread.java:829)
2023-10-03T14:10:29.289539Z I i.q.t.TestListener <<<< io.questdb.test.log.LogAlertSocketTest.testFailOverSingleHost duration_ms=5585
To reproduce
No response
Expected Behavior
No response
Environment
- **QuestDB version**:
- **OS**:
- **Browser**:
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running LogAlertSocketTest.testFailOverSingleHost() and review the failure at LogAlertSocketTest.java:168-192. Then inspect MockAlertTarget.java:75 alongside the logged socket timeout and failover messages. Done means the test reliably passes on the affected environment without masking the alert-manager behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- networking, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100