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

Sam Tunnicliffe updated CASSANDRA-17630:
----------------------------------------
    Test and Documentation Plan: Test change only, run modified test 1000x in 
CI to verify stability.
                         Status: Patch Available  (was: In Progress)

The problem turned out to be that the function to inject corruption wasn't 
always doing so. In cases where the expected corruption wasn't causing the 
connection to be closed during processing of the second frame of the first 
large message, the test would go on to process that message without attaching 
the connection instance to the request, causing the NPE. I've fixed the 
corruption injection and also made sure the connection is always associated to 
the request, which would have made the reason for the test failures clearer in 
the first case.

This is purely a test fix and I've linked to CI with 1000x runs of 
{{CQLConnectionTest}}, whereas I could reliably trigger failure with a 100x 
repeat before. The patch applies cleanly to 4.0, 4.1 & trunk.

|[17630-4.0|https://github.com/beobal/cassandra/commits/17630-4.0]|[Circle|https://app.circleci.com/pipelines/github/beobal/cassandra/402/workflows/8326a843-17da-41c2-85e2-f81a7d1c0cab/jobs/4011/steps]|
|[17630-4.1|https://github.com/beobal/cassandra/commits/17630-4.1]|[Circle|https://app.circleci.com/pipelines/github/beobal/cassandra/403/workflows/9ccab1e8-3aa7-4db7-b615-547f2e32a98a/jobs/4013/steps]|
|[17630-trunk|https://github.com/beobal/cassandra/commits/17630-trunk]|[Circle|https://app.circleci.com/pipelines/github/beobal/cassandra/404/workflows/09b78005-8e3b-4aba-868f-e2cfd7cfeb14/jobs/4016/steps]|


> Fix flaky test - 
> org.apache.cassandra.transport.CQLConnectionTest.handleCorruptionOfLargeMessageFrame
> -----------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-17630
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17630
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Messaging/Client
>            Reporter: Brandon Williams
>            Assignee: Sam Tunnicliffe
>            Priority: Normal
>             Fix For: 4.0.x, 4.1-beta, 4.1.x
>
>
> {noformat}
> Stacktrace
> junit.framework.AssertionFailedError
>       at 
> org.apache.cassandra.transport.CQLConnectionTest.testFrameCorruption(CQLConnectionTest.java:484)
>       at 
> org.apache.cassandra.transport.CQLConnectionTest.testFrameCorruption(CQLConnectionTest.java:443)
>       at 
> org.apache.cassandra.transport.CQLConnectionTest.handleCorruptionOfLargeMessageFrame(CQLConnectionTest.java:214)
>       at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> {noformat}
> https://ci-cassandra.apache.org/job/Cassandra-4.0/391/testReport/org.apache.cassandra.transport/CQLConnectionTest/handleCorruptionOfLargeMessageFrame_cdc_2/



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to