app/vmagent/remotewrite: removed unneeded code in testPushWriteRequest after 57801660ab

This commit is contained in:
Aliaksandr Valialkin 2023-02-22 12:15:15 -08:00
parent b6845951a5
commit f8811411fd
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -33,16 +33,6 @@ func testPushWriteRequest(t *testing.T, rowsCount, expectedBlockLenProm, expecte
pushBlockLen = len(block) pushBlockLen = len(block)
} }
pushWriteRequest(wr, pushBlock, isVMRemoteWrite) pushWriteRequest(wr, pushBlock, isVMRemoteWrite)
if pushBlockLen == expectedBlockLen {
return
}
if tolerancePrc == 0 {
t.Fatalf("unexpected block len for rowsCount=%d, isVMRemoteWrite=%v; got %d bytes; expecting %d bytes",
rowsCount, isVMRemoteWrite, pushBlockLen, expectedBlockLen)
}
if math.Abs(float64(pushBlockLen-expectedBlockLen)/float64(expectedBlockLen)*100) > tolerancePrc { if math.Abs(float64(pushBlockLen-expectedBlockLen)/float64(expectedBlockLen)*100) > tolerancePrc {
t.Fatalf("unexpected block len for rowsCount=%d, isVMRemoteWrite=%v; got %d bytes; expecting %d bytes +- %.0f%%", t.Fatalf("unexpected block len for rowsCount=%d, isVMRemoteWrite=%v; got %d bytes; expecting %d bytes +- %.0f%%",
rowsCount, isVMRemoteWrite, pushBlockLen, expectedBlockLen, tolerancePrc) rowsCount, isVMRemoteWrite, pushBlockLen, expectedBlockLen, tolerancePrc)