gocql icon indicating copy to clipboard operation
gocql copied to clipboard

Switch tests from SimpleStrategy to NetworkTopologyStrategy

Open sylwiaszunejko opened this issue 1 year ago • 1 comments

SimpleStrategy is getting depricated, as replacement is it recomended to use NetworkTopologyStrategy instead.

This PR switches tests to use NetworkTopologyStrategy. Tests that are specifically targeting SimpleStrategy stays as they are.

Fixes: #217

sylwiaszunejko avatar Sep 24 '24 06:09 sylwiaszunejko

I am not sure about the recreate tests, I only change the strategy in testdata/recreate files and used updateGolden option to automatically update golden files but the changes does not seem right https://github.com/scylladb/gocql/blob/master/recreate_test.go#L21 @dkropachev could you look at it? You added this option, maybe there is something I am missing on that part

sylwiaszunejko avatar Sep 24 '24 06:09 sylwiaszunejko

I am not sure about the recreate tests, I only change the strategy in testdata/recreate files and used updateGolden option to automatically update golden files but the changes does not seem right https://github.com/scylladb/gocql/blob/master/recreate_test.go#L21 @dkropachev could you look at it? You added this option, maybe there is something I am missing on that part

Why you think these changes are wrong ? Sure, there are some difference, but it looks reasonable considering difference between scylla and cassandra implementations.

dkropachev avatar Sep 24 '24 12:09 dkropachev

For example lack of 'replication_factor': '2' in keyspace_golden.cql was something I was not sure about, but I guess 'datacenter1': '2' means that in this dc replication factor is 2, I just wasn't that familiar with this notation

sylwiaszunejko avatar Sep 24 '24 12:09 sylwiaszunejko

For example lack of 'replication_factor': '2' in keyspace_golden.cql was something I was not sure about, but I guess 'datacenter1': '2' means that in this dc replication factor is 2, I just wasn't that familiar with this notation

Yes, it is also caught my attention, it should not happen, but it is happening not only for recreate tests. It looks like a bug, we need to dig deeper into it. Other than that I don't see any other problem there.

Since this potential bug has nothing to do with this PR, I think we can merge this PR and investigate issue later, WDYT ?

dkropachev avatar Sep 24 '24 12:09 dkropachev

For example lack of 'replication_factor': '2' in keyspace_golden.cql was something I was not sure about, but I guess 'datacenter1': '2' means that in this dc replication factor is 2, I just wasn't that familiar with this notation

Yes, it is also caught my attention, it should not happen, but it is happening not only for recreate tests. It looks like a bug, we need to dig deeper into it. Other than that I don't see any other problem there.

Since this potential bug has nothing to do with this PR, I think we can merge this PR and investigate issue later, WDYT ?

OK

sylwiaszunejko avatar Sep 24 '24 12:09 sylwiaszunejko