worryg0d commented on code in PR #1822: URL: https://github.com/apache/cassandra-gocql-driver/pull/1822#discussion_r1965407304
########## cassandra_test.go: ########## @@ -3256,6 +3256,10 @@ func TestCreateSession_DontSwallowError(t *testing.T) { func TestControl_DiscoverProtocol(t *testing.T) { cluster := createCluster() cluster.ProtoVersion = 0 + // Forcing to run this test without any compression. + // If compressor is presented, then CI will fail when snappy compression is enabled, since + // protocol v5 doesn't support it. + cluster.Compressor = nil Review Comment: This test verifies the protocol discovery mechanism by explicitly setting `cluster.ProtoVersion = 0`, so it means that this test doesn't depend on the CI matrix. The idea behind protocol discovery is to send a query to C* with the newest protocol version that the driver supports, which in this case is proto 5. For instance, the latest proto version supported by Cassandra 3 is proto 4, but the driver supports 5. The driver will send a query with proto 5 version, and C* 3 will return an error with the lowest and greatest proto versions. Then the driver picks the greatest one, which is v4 for C* 3. The issue comes when CI runs this test with `matrix.proto_version = 4` and `matrix.compressor = snappy`. Proto version is ignored, but not the compressor. So, the driver will send queries with max proto version of 5 and snappy compressor, which causes Cassandra to return an error about unsupported compressor type for protocol v5. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org