Skip to content

Commit

Permalink
Expect 0 for DcLocalReadRepairChance in Cassandra 4 and later
Browse files Browse the repository at this point in the history
The option was removed, see CASSANDRA-13910.
  • Loading branch information
martin-sucha committed Apr 20, 2023
1 parent ea9b541 commit 1697467
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cassandra_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2257,8 +2257,10 @@ func TestMaterializedViewMetadata(t *testing.T) {
t.Fatal("expected two views")
}
expectedChunkLengthInKB := "16"
expectedDCLocalReadRepairChance := float64(0)
if flagCassVersion.Before(4, 0, 0) {
expectedChunkLengthInKB = "64"
expectedDCLocalReadRepairChance = 0.1
}
expectedView1 := MaterializedViewMetadata{
Keyspace: "gocql_test",
Expand All @@ -2270,7 +2272,7 @@ func TestMaterializedViewMetadata(t *testing.T) {
Compaction: map[string]string{"class": "org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy", "max_threshold": "32", "min_threshold": "4"},
Compression: map[string]string{"chunk_length_in_kb": expectedChunkLengthInKB, "class": "org.apache.cassandra.io.compress.LZ4Compressor"},
CrcCheckChance: 1,
DcLocalReadRepairChance: 0.1,
DcLocalReadRepairChance: expectedDCLocalReadRepairChance,
DefaultTimeToLive: 0,
Extensions: map[string]string{},
GcGraceSeconds: 864000,
Expand All @@ -2287,7 +2289,7 @@ func TestMaterializedViewMetadata(t *testing.T) {
Compaction: map[string]string{"class": "org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy", "max_threshold": "32", "min_threshold": "4"},
Compression: map[string]string{"chunk_length_in_kb": expectedChunkLengthInKB, "class": "org.apache.cassandra.io.compress.LZ4Compressor"},
CrcCheckChance: 1,
DcLocalReadRepairChance: 0.1,
DcLocalReadRepairChance: expectedDCLocalReadRepairChance,
DefaultTimeToLive: 0,
Extensions: map[string]string{},
GcGraceSeconds: 864000,
Expand Down

0 comments on commit 1697467

Please sign in to comment.