fix rootcoord unstable ut (#26460)

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
pull/26656/head
wei liu 2023-08-30 09:42:27 +08:00 committed by GitHub
parent 89fc9aad82
commit cd7f811d40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -274,7 +274,7 @@ func TestQuotaCenter(t *testing.T) {
quotaCenter.resetAllCurrentRates() quotaCenter.resetAllCurrentRates()
quotaCenter.calculateWriteRates() quotaCenter.calculateWriteRates()
deleteFactor := float64(quotaCenter.currentRates[1][internalpb.RateType_DMLDelete]) / Params.QuotaConfig.DMLMaxInsertRatePerCollection.GetAsFloat() deleteFactor := float64(quotaCenter.currentRates[1][internalpb.RateType_DMLDelete]) / Params.QuotaConfig.DMLMaxInsertRatePerCollection.GetAsFloat()
assert.Equal(t, c.expectedFactor, deleteFactor) assert.True(t, math.Abs(deleteFactor-c.expectedFactor) < 0.01)
} }
Params.Save(Params.QuotaConfig.MaxTimeTickDelay.Key, backup) Params.Save(Params.QuotaConfig.MaxTimeTickDelay.Key, backup)
}) })