Skip to content

Commit

Permalink
cpu_profiler_test: expand accepted sample count
Browse files Browse the repository at this point in the history
In the scheduling group test we run two SGs and check that we get some
samples in both groups, at least 5 in each, but this is flaky.

Require at least 1 instead, which seems to pass 100% "on my machine".
  • Loading branch information
travisdowns committed Feb 20, 2025
1 parent 2b9be9e commit a4b772a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/unit/cpu_profiler_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,10 @@ SEASTAR_THREAD_TEST_CASE(scheduling_group_test) {
// groups so we don't really have the same guarantees we do in the
// single group case where we expect sort of +/- 1 due to the way we
// calculate the sampling intervals.
// Nominally the split is 10/10/0 for a/b/main, but we accept the
// below to keep flakiness to a minimum.
BOOST_CHECK_GT(count_a, 5);
BOOST_CHECK_GT(count_b, 5);
// Nominally the split is 10/10/0 for a/b/main, but we just look for
// at least 1 event in each to avoid flakiness.
BOOST_CHECK_GT(count_a, 0);
BOOST_CHECK_GT(count_b, 0);
BOOST_CHECK_LT(count_main, 3);
BOOST_CHECK_EQUAL(dropped_samples, 0);
}

0 comments on commit a4b772a

Please sign in to comment.