From 39de3dfc14f469509ea2f1aeffe258f96f33e148 Mon Sep 17 00:00:00 2001 From: rigazilla Date: Fri, 9 Oct 2026 17:02:03 +0200 Subject: [PATCH] docs: de-duplicate test counts; drop CI test-count badge The test counts were hand-typed in ~6 places across README.md and docs/STATUS.md and had already drifted. A CI-published shields.io badge (count_tests.sh + an orphan 'badges' branch force-pushed from CI) was prototyped to fix this, but is overkill for a solo, intermittently-worked repo. Instead, just remove the duplication: docs/STATUS.md (authoritative current-state doc) carries the totals once; README and the directory tree describe what is covered and defer to STATUS.md. Removes the CI badge step, scripts/count_tests.sh, and the README badges. DECISIONS.md records the badge as considered-and-rejected. Co-Authored-By: Claude Opus 4.8 --- README.md | 14 +++++++------- docs/DECISIONS.md | 30 ++++++++++++++++++++++++++++++ docs/STATUS.md | 22 ++++++++++++---------- 3 files changed, 49 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 03b6390..cd614d5 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ ctest -C Release --output-on-failure ## Testing -### Unit Tests (223 tests) +### Unit Tests ```bash cd build ./unit_tests @@ -124,7 +124,7 @@ cd build ctest -R UnitTests --output-on-failure ``` -### Integration Tests (89 tests, 18 suites) +### Integration Tests Requires Docker to run Infinispan server: ```bash cd build @@ -162,9 +162,9 @@ _(Step numbers follow [`../hotrod-foundry/ROADMAP.md`](../hotrod-foundry/ROADMAP [`docs/STATUS.md`](docs/STATUS.md) is authoritative for which steps are done — not any headline count.)_ -**Test Results** (verified 2026-09-25): -- Unit Tests: **223/223 passing** ✅ -- Integration Tests: **89/89 passing** ✅ across 18 suites (against live Infinispan via Docker) +**Test Results** — unit and integration suites all pass (integration against live +Infinispan via Docker). See [`docs/STATUS.md`](docs/STATUS.md) for the current +coverage breakdown and counts. ## Features @@ -266,8 +266,8 @@ cpp17-client/ │ ├── hash/ # MurmurHash3 + consistent hashing │ └── operations/ # Hot Rod operations (with failover) ├── tests/ # Test suite -│ ├── unit/ # 223 unit tests -│ └── integration/ # 89 integration tests, 18 suites (multi-node clusters) +│ ├── unit/ # unit tests (gtest) +│ └── integration/ # integration tests (multi-node clusters, Docker) ├── documentation/ # AsciiDoc user guide (index.adoc + topics/) ├── examples/ # Usage examples │ └── quickstart/ # Simple GET/PUT/REMOVE + retry + auth examples diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md index d1a8627..5a08bdc 100644 --- a/docs/DECISIONS.md +++ b/docs/DECISIONS.md @@ -704,3 +704,33 @@ all green live against a Dockerized auth-enabled Infinispan 16.0.7. Documented i `documentation/topics/security.adoc` (new AsciiDoc user guide, `documentation/index.adoc`) with a runnable snippet in `examples/quickstart/README.md`. + +## 2026-10-09 — Stop repeating test counts across docs (CI badge considered, rejected) + +**Problem.** The unit/integration test counts were hand-typed in ~6 places across +`README.md` and `docs/STATUS.md`. Every test change meant editing all of them, and +nothing verified the numbers — one README spot had silently drifted to `223 unit +tests` while the real count had moved on. + +**Considered: a CI-published shields.io badge.** Compute counts from the *built test +binaries* in CI (`scripts/count_tests.sh`, counting via `--gtest_list_tests` so the +number matches what actually runs and needs no Docker) and force-push a shields +endpoint JSON to an orphan `badges` branch for the README to embed. Prototyped, then +**rejected as overkill** for a solo, intermittently-worked repo: it added a CI step +with `contents: write`, an orphan branch, a helper script, and a badge that 404s +until the first post-merge run and lags behind CDN caching — a lot of moving parts +to avoid typing a number. + +**Decision.** Just remove the duplication. `docs/STATUS.md` (the authoritative +current-state doc) carries the totals **once**, in its "Test status" section; +everywhere else describes *what* is covered rather than repeating the totals: +- README drops all hard counts — the `### Unit Tests` / `### Integration Tests` + headings, the directory-tree comments, and the "Test Results" block (which now + points at STATUS.md for the breakdown). +- Per-feature breadcrumbs ("shipped … N unit + M integration tests") stay, as + point-in-time slice notes. + +The one-place count is refreshed by hand when it drifts; `--gtest_list_tests` on the +built binaries (`unit_tests` plus the ctest `integration`-labelled suites) is the +quick way to get the real number (250 unit / 92 integration / 19 suites as of this +entry) without a `grep TEST(`, which overcounts parameterized/disabled macros. diff --git a/docs/STATUS.md b/docs/STATUS.md index f9288dc..54d73fe 100644 --- a/docs/STATUS.md +++ b/docs/STATUS.md @@ -4,7 +4,7 @@ > If any other doc disagrees with this file, this file wins. Point-in-time > snapshots live in [`archive/`](archive/) and are historical only. > -> **Last updated:** 2026-09-25 +> **Last updated:** 2026-10-12 --- @@ -243,16 +243,18 @@ multiplexing. See "Working and shipped" below._ Docker daemon; Windows doesn't build the integration tests). Windows/MSVC portability and `-Werror` build parity also landed (Sept 2026). -**Test status (verified 2026-09-25):** -- Unit: **223/223** passing (`./build/unit_tests`, <1s) — +19 for the auth work +**Test status:** **250 unit** + **92 integration** (19 suites), all passing. This is +the one authoritative count — other docs describe *what* is covered rather than +repeating the totals. (Counts read from the built test binaries via +`--gtest_list_tests`, so they match what actually runs.) +- Unit (`./build/unit_tests`, <1s) — covers the auth work (`AuthCodecTest` body round-trips + `SaslAuthenticatorTest`, a parameterized SCRAM-SHA-1/256/512 handshake driven by a fake OpenSSL server, plus - mech-not-offered / unsupported-mech / bad-server-signature failure paths); the - earlier +17 for `ServerSelectionTest` (`orderKeyCandidates` + `unionNodes`, - Step 11b slices 1–3; +3 keyless-ordering tests for `selectAnyServer`, Step 11c - slice 1) still stands -- Integration: **89/89** passing across 18 suites (`ctest`, spins up Docker - Infinispan single-server + multi-node clusters), now also green on Linux CI. + mech-not-offered / unsupported-mech / bad-server-signature failure paths) and + `ServerSelectionTest` (`orderKeyCandidates` + `unionNodes`, Step 11b slices 1–3; + keyless-ordering for `selectAnyServer`, Step 11c slice 1). +- Integration (`ctest`, spins up Docker + Infinispan single-server + multi-node clusters), green on Linux CI. +3 for `RetryViewIntegrationTest` (Step 11b: `excluding()` routes around an owner; proxy-disabled owners-exhausted throw; the catch→`excluding(e)` retry loop recovers after the primary owner is killed) — verified 3/3 this session. @@ -268,7 +270,7 @@ multiplexing. See "Working and shipped" below._ tolerate a GET racing ahead of its PUT — a `nullopt` is expected, only a present-but-wrong value is an error. - Full run: `ctest --test-dir build --output-on-failure` → 100% pass - (19 ctest tests: 1 unit + 18 integration suites) + (the unit binary + the integration suites) - **Concurrency validated (2026-09-25):** the concurrent suites pass 8/8 (incl. `ConcurrentWithFailover`), and a ThreadSanitizer run (`build-tsan/`) reports **no races in production code** — slice-4's `stateMutex_`/`shared_ptr`