Closed Felixoid closed 3 years ago
TestProm1UnpackFast flaps because fast and slow tests executed one after another. This patch fixes the different now values for their writer.
now
writer
The writer as well is created early, before protobuf unmarshaling.
Before the patch:
$ go test -count=5000 github.com/lomik/carbon-clickhouse/receiver -run TestProm1UnpackFast | grep FAIL --- FAIL: TestProm1UnpackFast (0.68s) --- FAIL: TestProm1UnpackFast (0.67s) --- FAIL: TestProm1UnpackFast (0.70s) --- FAIL: TestProm1UnpackFast (0.67s) --- FAIL: TestProm1UnpackFast (0.68s) --- FAIL: TestProm1UnpackFast (0.68s) --- FAIL: TestProm1UnpackFast (0.68s) --- FAIL: TestProm1UnpackFast (0.63s) --- FAIL: TestProm1UnpackFast (0.68s) --- FAIL: TestProm1UnpackFast (0.66s) --- FAIL: TestProm1UnpackFast (0.67s) --- FAIL: TestProm1UnpackFast (0.63s) --- FAIL: TestProm1UnpackFast (0.66s) --- FAIL: TestProm1UnpackFast (0.68s) --- FAIL: TestProm1UnpackFast (0.67s) --- FAIL: TestProm1UnpackFast (0.65s) --- FAIL: TestProm1UnpackFast (0.66s) --- FAIL: TestProm1UnpackFast (0.66s) --- FAIL: TestProm1UnpackFast (0.64s) --- FAIL: TestProm1UnpackFast (0.60s) --- FAIL: TestProm1UnpackFast (0.66s) --- FAIL: TestProm1UnpackFast (0.61s) --- FAIL: TestProm1UnpackFast (0.53s) --- FAIL: TestProm1UnpackFast (0.60s) --- FAIL: TestProm1UnpackFast (0.59s) --- FAIL: TestProm1UnpackFast (0.38s) --- FAIL: TestProm1UnpackFast (0.55s) --- FAIL: TestProm1UnpackFast (0.67s) FAIL FAIL github.com/lomik/carbon-clickhouse/receiver 62.544s FAIL
after the patch
$ go test -count=5000 github.com/lomik/carbon-clickhouse/receiver -run TestProm1UnpackFast ok github.com/lomik/carbon-clickhouse/receiver 44.304s
TestProm1UnpackFast flaps because fast and slow tests executed one after another. This patch fixes the different
now
values for theirwriter
.The writer as well is created early, before protobuf unmarshaling.
Before the patch:
after the patch