You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by jo...@apache.org on 2023/02/22 18:43:22 UTC
[kafka] branch 3.2 updated: MINOR: Fix flaky testClientDisconnectionUpdatesRequestMetrics() (#11987) (#12957)
This is an automated email from the ASF dual-hosted git repository.
jolshan pushed a commit to branch 3.2
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/3.2 by this push:
new d1d3b5a486a MINOR: Fix flaky testClientDisconnectionUpdatesRequestMetrics() (#11987) (#12957)
d1d3b5a486a is described below
commit d1d3b5a486a549d6d35c26fb5e88b868a92b34e4
Author: Anastasia Vela <av...@confluent.io>
AuthorDate: Wed Feb 22 10:43:12 2023 -0800
MINOR: Fix flaky testClientDisconnectionUpdatesRequestMetrics() (#11987) (#12957)
Reviewers: David Jacot <dj...@confluent.io>
---
core/src/test/scala/unit/kafka/network/SocketServerTest.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/src/test/scala/unit/kafka/network/SocketServerTest.scala b/core/src/test/scala/unit/kafka/network/SocketServerTest.scala
index 33d15ad10b5..3be2664338b 100644
--- a/core/src/test/scala/unit/kafka/network/SocketServerTest.scala
+++ b/core/src/test/scala/unit/kafka/network/SocketServerTest.scala
@@ -1124,12 +1124,12 @@ class SocketServerTest {
val requestMetrics = channel.metrics(request.header.apiKey.name)
def totalTimeHistCount(): Long = requestMetrics.totalTimeHist.count
+ val expectedTotalTimeCount = totalTimeHistCount() + 1
val send = new NetworkSend(request.context.connectionId, ByteBufferSend.sizePrefixed(ByteBuffer.allocate(responseBufferSize)))
val headerLog = new ObjectNode(JsonNodeFactory.instance)
headerLog.set("response", new TextNode("someResponse"))
channel.sendResponse(new RequestChannel.SendResponse(request, send, Some(headerLog), None))
- val expectedTotalTimeCount = totalTimeHistCount() + 1
TestUtils.waitUntilTrue(() => totalTimeHistCount() == expectedTotalTimeCount,
s"request metrics not updated, expected: $expectedTotalTimeCount, actual: ${totalTimeHistCount()}")