diff --git a/test/cluster_helper.go b/test/cluster_helper.go index 0e6ac343d..22a9a64c0 100644 --- a/test/cluster_helper.go +++ b/test/cluster_helper.go @@ -38,6 +38,8 @@ const ( post6Version = "7.0.0.0" pre6Version = "5.7.0.17" version6 = "6.0.0.5" + + latestSchemaVersion = "7.1.0" ) var ( diff --git a/test/dynamic_config_test.go b/test/dynamic_config_test.go index 36150e194..becbf0756 100644 --- a/test/dynamic_config_test.go +++ b/test/dynamic_config_test.go @@ -32,7 +32,11 @@ type podID struct { const clName = "dynamic-config-test" -var configWithMaxDefaultVal = mapset.NewSet("info-max-ms", "flush-max-ms") +var ( + configWithMaxDefaultVal = mapset.NewSet("info-max-ms", "flush-max-ms") + configWithPow2Val = mapset.NewSet("flush-size", "transaction-queue-limit") + configWithMul100Val = mapset.NewSet("max-throughput") +) var _ = Describe( "DynamicConfig", func() { @@ -532,7 +536,7 @@ var _ = Describe( podPIDMap, err := getPodIDs(ctx, aeroCluster) Expect(err).ToNot(HaveOccurred()) - dynamic, err := asconfig.GetDynamic("7.0.0") + dynamic, err := asconfig.GetDynamic(latestSchemaVersion) Expect(err).ToNot(HaveOccurred()) flatServer, flatSpec, err := getAerospikeConfigFromNodeAndSpec(aeroCluster) @@ -801,8 +805,11 @@ func validateNamespaceContextDynamically( } if v != nil { - if configWithMaxDefaultVal.Contains(asconfig.BaseKey(confKey)) { + switch { + case configWithMaxDefaultVal.Contains(asconfig.BaseKey(confKey)): v = v.(int64) - 1 + case configWithPow2Val.Contains(asconfig.BaseKey(confKey)): + v = (v.(int64) - 1) * 2 } newSpec[confKey] = v @@ -900,10 +907,10 @@ func validateXDRNSFieldsDynamically(ctx goctx.Context, flatServer, flatSpec *asc } if v != nil { - switch asconfig.BaseKey(confKey) { - case "max-throughput": + switch { + case configWithMul100Val.Contains(asconfig.BaseKey(confKey)): v = v.(int64) + 99 - case "transaction-queue-limit": + case configWithPow2Val.Contains(asconfig.BaseKey(confKey)): v = (v.(int64) - 1) * 2 }