From 445e20f0579d14b2cf40485c8e8998066068bd81 Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Mon, 27 Jul 2026 16:49:21 +0100 Subject: [PATCH] fix(test): assert the derived mean is positive, not unsigned >= 0 The gcc debug-coverage job failed where clang, macos and windows passed: gcc's -Werror=type-limits rejects comparing an unsigned expression against zero with >=, because it is always true. The assertion was vacuous anyway. Both operands are unsigned, so the check proved nothing, while the comment beside it says the intent was a non-zero microsecond figure. Now asserts strictly positive, which is what it meant. The same job also logs a CMake LTO capability probe failing on a missing compiler-ar and prints the code-generation guard's echo line; neither is related to this branch. Co-Authored-By: Claude Opus 5 (1M context) --- src/test/nodestore/Database_test.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/nodestore/Database_test.cpp b/src/test/nodestore/Database_test.cpp index b3c0d8b4d4..b79abb8b27 100644 --- a/src/test/nodestore/Database_test.cpp +++ b/src/test/nodestore/Database_test.cpp @@ -604,7 +604,9 @@ public: // A mean derived the way the telemetry gauge derives it must be a // sane, non-zero microsecond figure rather than a division artifact. - BEAST_EXPECT(dest->getStoreDurationUs() / dest->getStoreCount() >= 0); + // Asserted as strictly positive: both operands are unsigned, so a + // >= 0 check would be vacuously true and gcc rejects it outright. + BEAST_EXPECT(dest->getStoreDurationUs() / dest->getStoreCount() > 0); } //--------------------------------------------------------------------------