[
https://issues.apache.org/jira/browse/KAFKA-17265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17878771#comment-17878771
]
Igor Soarez commented on KAFKA-17265:
-------------------------------------
Saw this fail again on the Java 17 tests for
https://github.com/apache/kafka/pull/17004
{code:java}
org.apache.kafka.common.record.MemoryRecordsBuilderTest.
"testBuffersDereferencedOnClose(Args).args=magic=2, bufferOffset=0,
compression=org.apache.kafka.common.compress.GzipCompression@1e"
org.opentest4j.AssertionFailedError: Memory usage too high: 44779664 ==>
expected: <true> but was: <false>
at
app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
at
app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
at app//org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
at app//org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:214)
at
app//org.apache.kafka.common.record.MemoryRecordsBuilderTest.testBuffersDereferencedOnClose(MemoryRecordsBuilderTest.java:766)
{code}
> Fix flaky MemoryRecordsBuilderTest#testBuffersDereferencedOnClose
> -----------------------------------------------------------------
>
> Key: KAFKA-17265
> URL: https://issues.apache.org/jira/browse/KAFKA-17265
> Project: Kafka
> Issue Type: Sub-task
> Reporter: Chia-Ping Tsai
> Assignee: Kuan Po Tseng
> Priority: Minor
>
> The test depends on GC to verify the memory usage. However, that is unstable.
> All we want to prove is that the inner "object" will drop the reference.
> Hence, we should rewrite the test to check the reference of inner object
> instead of calling GC.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)