[ 
https://issues.apache.org/jira/browse/KAFKA-14345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Greg Harris updated KAFKA-14345:
--------------------------------
    Description: 
The DynamicConnectionQuotaTest is an integration test targeting the throttling 
behavior of listeners' accept thread. This test has been flaking out recently 
with errors such as the following:
{noformat}
Caused by: org.opentest4j.AssertionFailedError: Listener PLAINTEXT connection 
rate 14.558271396827829 must be below 14.399999999999999 ==> 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:210)
        at 
app//kafka.network.DynamicConnectionQuotaTest.verifyConnectionRate(DynamicConnectionQuotaTest.scala:412)
        at 
app//kafka.network.DynamicConnectionQuotaTest.$anonfun$testDynamicListenerConnectionCreationRateQuota$4(DynamicConnectionQuotaTest.scala:227){noformat}
The test appears to be using a hard-coded error bound of 1.2f, which does not 
appear to be correct given the windowed algorithm. Instead of a hardcoded 
value, the bound should conform to the test execution to assert a more accurate 
bound.

 

A similar issue seems to be present in ConnectionQuotasTest, with the following 
test failure:
{noformat}
java.util.concurrent.ExecutionException: org.opentest4j.AssertionFailedError: 
Expected rate (30 +- 7), but got 37.5751503006012 (600 connections / 15.968 
sec) ==> expected: <30.0> but was: <37.5751503006012> 
    at java.util.concurrent.FutureTask.report(FutureTask.java:122) 
    at java.util.concurrent.FutureTask.get(FutureTask.java:206) 
    at 
kafka.network.ConnectionQuotasTest.$anonfun$testListenerConnectionRateLimitWhenActualRateAboveLimit$3(ConnectionQuotasTest.scala:411)
    at scala.collection.immutable.List.foreach(List.scala:333)
    at 
kafka.network.ConnectionQuotasTest.testListenerConnectionRateLimitWhenActualRateAboveLimit(ConnectionQuotasTest.scala:411){noformat}

  was:
The DynamicConnectionQuotaTest is an integration test targeting the throttling 
behavior of listeners' accept thread. This test has been flaking out recently 
with errors such as the following:
{noformat}
Caused by: org.opentest4j.AssertionFailedError: Listener PLAINTEXT connection 
rate 14.558271396827829 must be below 14.399999999999999 ==> 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:210)
        at 
app//kafka.network.DynamicConnectionQuotaTest.verifyConnectionRate(DynamicConnectionQuotaTest.scala:412)
        at 
app//kafka.network.DynamicConnectionQuotaTest.$anonfun$testDynamicListenerConnectionCreationRateQuota$4(DynamicConnectionQuotaTest.scala:227){noformat}
The test appears to be using a hard-coded error bound of 1.2f, which does not 
appear to be correct given the windowed algorithm. Instead of a hardcoded 
value, the bound should conform to the test execution to assert a more accurate 
bound.

 

A similar issue seems to be present in ConnectionQuotasTest, 


> Flakey Tests for Connection Quotas should use correct error bounds
> ------------------------------------------------------------------
>
>                 Key: KAFKA-14345
>                 URL: https://issues.apache.org/jira/browse/KAFKA-14345
>             Project: Kafka
>          Issue Type: Test
>          Components: network
>            Reporter: Greg Harris
>            Assignee: Greg Harris
>            Priority: Minor
>
> The DynamicConnectionQuotaTest is an integration test targeting the 
> throttling behavior of listeners' accept thread. This test has been flaking 
> out recently with errors such as the following:
> {noformat}
> Caused by: org.opentest4j.AssertionFailedError: Listener PLAINTEXT connection 
> rate 14.558271396827829 must be below 14.399999999999999 ==> 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:210)
>       at 
> app//kafka.network.DynamicConnectionQuotaTest.verifyConnectionRate(DynamicConnectionQuotaTest.scala:412)
>       at 
> app//kafka.network.DynamicConnectionQuotaTest.$anonfun$testDynamicListenerConnectionCreationRateQuota$4(DynamicConnectionQuotaTest.scala:227){noformat}
> The test appears to be using a hard-coded error bound of 1.2f, which does not 
> appear to be correct given the windowed algorithm. Instead of a hardcoded 
> value, the bound should conform to the test execution to assert a more 
> accurate bound.
>  
> A similar issue seems to be present in ConnectionQuotasTest, with the 
> following test failure:
> {noformat}
> java.util.concurrent.ExecutionException: org.opentest4j.AssertionFailedError: 
> Expected rate (30 +- 7), but got 37.5751503006012 (600 connections / 15.968 
> sec) ==> expected: <30.0> but was: <37.5751503006012> 
>     at java.util.concurrent.FutureTask.report(FutureTask.java:122) 
>     at java.util.concurrent.FutureTask.get(FutureTask.java:206) 
>     at 
> kafka.network.ConnectionQuotasTest.$anonfun$testListenerConnectionRateLimitWhenActualRateAboveLimit$3(ConnectionQuotasTest.scala:411)
>     at scala.collection.immutable.List.foreach(List.scala:333)
>     at 
> kafka.network.ConnectionQuotasTest.testListenerConnectionRateLimitWhenActualRateAboveLimit(ConnectionQuotasTest.scala:411){noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to