You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by da...@apache.org on 2022/04/04 07:10:44 UTC
[kafka] branch trunk updated: MINOR: Fix flaky testClientDisconnectionUpdatesRequestMetrics() (#11987)
This is an automated email from the ASF dual-hosted git repository.
dajac pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new ae45c59e61 MINOR: Fix flaky testClientDisconnectionUpdatesRequestMetrics() (#11987)
ae45c59e61 is described below
commit ae45c59e61c34fcf1abb5d4731a99d400d2c79be
Author: Anastasia Vela <av...@confluent.io>
AuthorDate: Mon Apr 4 00:10:33 2022 -0700
MINOR: Fix flaky testClientDisconnectionUpdatesRequestMetrics() (#11987)
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 443edb1a79..6c52061308 100644
--- a/core/src/test/scala/unit/kafka/network/SocketServerTest.scala
+++ b/core/src/test/scala/unit/kafka/network/SocketServerTest.scala
@@ -1125,12 +1125,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()}")