Skip to content
Snippets Groups Projects
Commit 3ac464be authored by Alexander Turenko's avatar Alexander Turenko Committed by Igor Munkin
Browse files

test: expect slow metrics collection in a test

The feedback daemon test case fails in CI after recent changes for
override modules. It is observed on GCOV (coverage) job and on macOS
jobs.

I found no direct correspondence between the changes and the feedback
daemon code/test case.

The test case runs metrics collection for 0.3 seconds with 0.01
interval. It accepts [22; 38] samples as a correct result. I got 7-22
samples on GCOV build in CI.

It means that the tested code is working, but slower. The tested code
don't run the newly added code, but the new code is run at tarantool
initialization. I think that the fails in CI are due to influence of the
changed initialization code in composition with LuaJIT's unstable
performance: some traces are collected differently, GC runs on different
points and we're here.

I changed the feedback daemon test case to accept [5; 55] samples as a
correct result.

Follows up #7774
Follows up #8192

NO_DOC=test adjustment
NO_CHANGELOG=see NO_DOC
parent 87b4da31
No related branches found
No related tags found
No related merge requests found
......@@ -45,8 +45,15 @@ g.test_metrics = function()
local fb = daemon.generate_feedback()
-- This check may fail because of assertion failure in collect method.
t.assert_type(fb.metrics, 'table')
-- Huge margin to prevent flakiness on slow environments like coverity.
t.assert_almost_equals(#fb.metrics, 30, 8)
-- Huge margin to prevent flakiness.
--
-- ASAN and GCOV builds looks very affected and macOS too.
--
-- In fact, this check verifies that *some* samples are collected. It
-- doesn't attempt to ensure correct timings, which is nearly
-- impossible in the general case, when many processes performs its own
-- workloads in parallel.
t.assert_almost_equals(#fb.metrics, 30, 25)
fb = daemon.generate_feedback()
-- Check is metrics were reset. Fiber yields on feedback generation, so
-- metrics may be not empty.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment