scylladb / cpp-rust-driver

API-compatible rewrite of https://github.com/scylladb/cpp-driver as a wrapper for Rust driver.
GNU Lesser General Public License v2.1
13 stars 11 forks source link

Cassandra types tests #69

Closed Gor027 closed 1 year ago

Gor027 commented 1 year ago

Pre-review checklist

This PR is dependent on #68.

Adds necessary implementation to pass all CassandraTypesTests excluding UDT tests as it requires an implementation to get cluster schema metadata, so it will be done in another PR. Tests are modified to properly iterate over collections to check their values and size. As CassandraTypesTests tests collections with all possible types, overall 208 tests are enabled. Only tests for Decimal and Varint types are disabled, as invoke_binder_maker_macro_with_type is not yet implemented for Decimal type and cass_value_get_bytes is not implemented for Varint. The latter should be implemented for all types, however, it requires the rust driver to return raw bytes of values instead of CqlValue.

avelanarius commented 1 year ago

Interestingly, BasicsTests.Integration_Cassandra_Timestamps failed in the latest run (https://github.com/scylladb/cpp-rust-driver/actions/runs/2890498078/attempts/1). It looks like it's a bit time-sensitive and might be flaky on slower machines (such as GitHub Actions workers).

@Gor027 Have you seen this before?

Gor027 commented 1 year ago

Yes, I was aware of it. Maybe we can manually increase the acceptable difference in the test, to avoid failures because of slow machines?

avelanarius commented 1 year ago

The Integration_Cassandra_Timestamps will be fixed in a follow-up PR as agreed.