Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,18 @@ if(GTest_FOUND)
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
LABELS "integration;docker;auth"
)

# Fail fast if a suite hangs (e.g. a server/CLI-version regression stalls a
# subprocess) instead of letting one stuck test burn the whole CI job budget.
set_tests_properties(
PingIntegrationTests GetIntegrationTests GetWithMetadataIntegrationTests
PutIntegrationTests RemoveIntegrationTests RemoveWithVersionIntegrationTests
ReplaceWithVersionIntegrationTests PutIfAbsentIntegrationTests ReplaceIntegrationTests
ContainsKeyIntegrationTests ErrorHandlingIntegrationTests TopologyIntegrationTests
ConcurrentClientsTests HashAwareRoutingIntegrationTests ConcurrentMultiServerTests
RetryViewIntegrationTests PingRetryIntegrationTests AuthIntegrationTests
PROPERTIES TIMEOUT 300
)
endif() # NOT WIN32 (integration tests)

message(STATUS "Google Test found - unit tests enabled (integration tests: non-Windows only)")
Expand Down
32 changes: 32 additions & 0 deletions docs/DECISIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -704,3 +704,35 @@ 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-12 — Integration tests hung on CI: Infinispan `:latest` CLI stopped exiting on EOF

**Symptom.** Every CI run from Oct 9 on hung: `GetIntegrationTests` started and
produced no further output until the 30-min job timeout cancelled it (an orphan
`docker` process was left behind). Only the Ubuntu job runs integration tests
(Fedora is build-only, Windows doesn't build them), so it looked Ubuntu-specific.
`main` had last run green on 2026-09-25 and the branch on top of it was docs-only —
the code was identical, so the trigger was environmental, not the change.

**Root cause.** The integration tests pull `quay.io/infinispan/server:`**`latest`**
(never pinned). Between Sep-25 and Oct-9 `:latest` advanced from 16.0.x to
**16.3.0**, and 16.3's `cli.sh`, when fed a command through a pipe
(`echo 'create cache …' | cli.sh -c <url>`), now **runs the command but does not
exit on stdin EOF** — it drops into an interactive session and blocks forever.
16.0.x exited cleanly on EOF. The helper `createCacheViaCLI` (copy-pasted into 13
integration files) wraps that in `system("… >/dev/null 2>&1")` with no timeout, so
the whole suite hung. Reproduced locally against both 16.3.0 (hangs) and 16.0.7
(exits) via podman.

**Fix.** Run the CLI in batch mode: `cli.sh -c <url> `**`-f -`** (read commands from
stdin, exit at EOF). Applied to all 13 `createCacheViaCLI` copies. Also added a
per-test ctest **`TIMEOUT 300`** to every integration suite so a future stall fails
in minutes instead of burning the 30-min job budget (slowest real suite is
`TopologyIntegrationTests` at ~117s, so 300s has comfortable headroom).

**Not pinned.** 16.3.0 is otherwise fully compatible — the full `ctest -L
integration` suite passes **18/18 green against real docker on `:latest` (16.3.0)**
(verified 2026-10-12). An earlier local `Connection reset by peer` on the Get ops
was a rootless-podman networking artifact (reproduced identically on known-good
16.0.7, and absent under real docker), not a version regression — so `:latest` was
left unpinned rather than frozen to an old release.
8 changes: 7 additions & 1 deletion docs/STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

---

Expand Down Expand Up @@ -242,6 +242,12 @@ multiplexing. See "Working and shipped" below._
Windows and Fedora stay unit-only (Fedora runs inside a container with no
Docker daemon; Windows doesn't build the integration tests). Windows/MSVC
portability and `-Werror` build parity also landed (Sept 2026).
- **Integration tests pull `quay.io/infinispan/server:latest`** (unpinned).
Cache setup goes through `cli.sh -c <url> -f -` (batch mode, exits on EOF) and
each ctest integration suite has `TIMEOUT 300`, so a server/CLI-version change
that stalls a subprocess fails fast instead of hanging the whole CI job. Full
suite verified green against `:latest` = 16.3.0 on 2026-10-12. See
[`DECISIONS.md`](DECISIONS.md).

**Test status (verified 2026-09-25):**
- Unit: **223/223** passing (`./build/unit_tests`, <1s) — +19 for the auth work
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/ConcurrentClientsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace {
void createCacheViaCLI(const std::string& cacheName) {
std::string cmd = "docker exec " + InfinispanTestEnvironment::containerID +
" bash -c \"echo 'create cache --template=org.infinispan.DIST_SYNC " + cacheName +
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222\" >/dev/null 2>&1";
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222 -f -\" >/dev/null 2>&1";
std::ignore = system(cmd.c_str());
}

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/ContainsKeyIntegrationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace {
void createCacheViaCLI(const std::string& cacheName) {
std::string cmd = "docker exec " + InfinispanTestEnvironment::containerID +
" bash -c \"echo 'create cache --template=org.infinispan.DIST_SYNC " + cacheName +
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222\" >/dev/null 2>&1";
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222 -f -\" >/dev/null 2>&1";
std::ignore = system(cmd.c_str());
}

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/ErrorHandlingIntegrationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace {
void createCacheViaCLI(const std::string& cacheName) {
std::string cmd = "docker exec " + InfinispanTestEnvironment::containerID +
" bash -c \"echo 'create cache --template=org.infinispan.DIST_SYNC " + cacheName +
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222\" >/dev/null 2>&1";
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222 -f -\" >/dev/null 2>&1";
std::ignore = system(cmd.c_str());
}
} // namespace
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/GetIntegrationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace {
void createCacheViaCLI(const std::string& cacheName) {
std::string cmd = "docker exec " + InfinispanTestEnvironment::containerID +
" bash -c \"echo 'create cache --template=org.infinispan.DIST_SYNC " + cacheName +
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222\" >/dev/null 2>&1";
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222 -f -\" >/dev/null 2>&1";
std::ignore = system(cmd.c_str());
}

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/GetWithMetadataIntegrationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace {
void createCacheViaCLI(const std::string& cacheName) {
std::string cmd = "docker exec " + InfinispanTestEnvironment::containerID +
" bash -c \"echo 'create cache --template=org.infinispan.DIST_SYNC " + cacheName +
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222\" >/dev/null 2>&1";
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222 -f -\" >/dev/null 2>&1";
std::ignore = system(cmd.c_str());
}

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/PutIfAbsentIntegrationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace {
void createCacheViaCLI(const std::string& cacheName) {
std::string cmd = "docker exec " + InfinispanTestEnvironment::containerID +
" bash -c \"echo 'create cache --template=org.infinispan.DIST_SYNC " + cacheName +
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222\" >/dev/null 2>&1";
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222 -f -\" >/dev/null 2>&1";
std::ignore = system(cmd.c_str());
}

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/PutIntegrationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace {
void createCacheViaCLI(const std::string& cacheName) {
std::string cmd = "docker exec " + InfinispanTestEnvironment::containerID +
" bash -c \"echo 'create cache --template=org.infinispan.DIST_SYNC " + cacheName +
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222\" >/dev/null 2>&1";
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222 -f -\" >/dev/null 2>&1";
std::ignore = system(cmd.c_str());
}

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/RemoveIntegrationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace {
void createCacheViaCLI(const std::string& cacheName) {
std::string cmd = "docker exec " + InfinispanTestEnvironment::containerID +
" bash -c \"echo 'create cache --template=org.infinispan.DIST_SYNC " + cacheName +
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222\" >/dev/null 2>&1";
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222 -f -\" >/dev/null 2>&1";
std::ignore = system(cmd.c_str());
}

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/RemoveWithVersionIntegrationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace {
void createCacheViaCLI(const std::string& cacheName) {
std::string cmd = "docker exec " + InfinispanTestEnvironment::containerID +
" bash -c \"echo 'create cache --template=org.infinispan.DIST_SYNC " + cacheName +
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222\" >/dev/null 2>&1";
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222 -f -\" >/dev/null 2>&1";
std::ignore = system(cmd.c_str());
}

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/ReplTopologyChangeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ReplTopologyChangeTest : public ::testing::Test {
std::string cmd = "docker exec " + server.containerID +
" bash -c \"echo 'create cache --template=org.infinispan.DIST_SYNC " +
std::string(TEST_CACHE) +
"' | /opt/infinispan/bin/cli.sh -c http://localhost:11222\" >/dev/null 2>&1";
"' | /opt/infinispan/bin/cli.sh -c http://localhost:11222 -f -\" >/dev/null 2>&1";
std::ignore = system(cmd.c_str());
}

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/ReplaceIntegrationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace {
void createCacheViaCLI(const std::string& cacheName) {
std::string cmd = "docker exec " + InfinispanTestEnvironment::containerID +
" bash -c \"echo 'create cache --template=org.infinispan.DIST_SYNC " + cacheName +
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222\" >/dev/null 2>&1";
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222 -f -\" >/dev/null 2>&1";
std::ignore = system(cmd.c_str());
}

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/ReplaceWithVersionIntegrationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace {
void createCacheViaCLI(const std::string& cacheName) {
std::string cmd = "docker exec " + InfinispanTestEnvironment::containerID +
" bash -c \"echo 'create cache --template=org.infinispan.DIST_SYNC " + cacheName +
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222\" >/dev/null 2>&1";
"' | /opt/infinispan/bin/cli.sh -c http://admin:password@localhost:11222 -f -\" >/dev/null 2>&1";
std::ignore = system(cmd.c_str());
}

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/TopologyTestFixture.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class TopologyTest : public ::testing::Test {
std::string cmd = "docker exec " + server.containerID +
" bash -c \"echo 'create cache --template=org.infinispan.DIST_SYNC " +
std::string(TEST_CACHE) +
"' | /opt/infinispan/bin/cli.sh -c http://localhost:11222\" >/dev/null 2>&1";
"' | /opt/infinispan/bin/cli.sh -c http://localhost:11222 -f -\" >/dev/null 2>&1";
std::ignore = system(cmd.c_str());
}

Expand Down
Loading