Cockatrice/servatrice
BruebachL ccda73fe5c
[Server] Smoke-test the dev server end to end (#7865)
* [Server] Smoke-test the dev server end to end

Spawns servatrice-dev on an ephemeral port and drives a real RemoteClient through login, room list, room join and game creation, asserting each response and the Event_GameJoined payload. The test is WITH_SERVER-gated, links only the client remote library, and keeps the dev server's throwaway settings inside a temporary directory.

* [Server] Publish the dev server's port through a file

The smoke test parsed the listening port out of the dev server's stdout,
but the server announces it from the main thread while the logger thread
writes to the same stream. A log line can land inside the announcement —
Arch CI caught it — leaving the digits on the next line, so the test read
nothing and failed.

Add --port-file, written through QSaveFile once the server listens, and
read the port from there instead of from the log. The file is either
absent or complete, so logging cannot corrupt the handshake.

* [Tests] Tick the event loop while waiting for the port file

The port-file wait loop slept with QThread::msleep and never reached the
event dispatcher. QProcess fills its read buffers and flips its state only
from its socket notifiers, so drainProcessOutput() was a no-op and a child
that died before publishing its port went unnoticed until the full 15 s
startup timeout, with empty stdout and stderr in the failure message.

Pump the event loop instead, as the previous waitForReadyRead loop did.
2026-11-10 12:16:36 +01:00
..
dev [Server] Smoke-test the dev server end to end (#7865) 2026-11-10 12:16:36 +01:00
docker Docker-compose setup for Servatrice (#3887) 2020-03-16 21:40:58 -04:00
migrations [Security] Add challenge-response auth with scrypt verifiers and stop storing plaintext passwords (#7193) 2026-10-16 22:52:26 +02:00
mysql-storage Docker-Compose support for Windows (#3974) 2020-05-08 15:22:39 -04:00
resources Update macOS Monterey app icon (#4805) 2023-08-06 17:46:03 -04:00
scripts Add Discord account registration monitor (#7013) 2026-06-21 01:09:57 -04:00
src [Server] Add a servatrice-dev executable on the in-memory database (#7864) 2026-11-10 12:16:36 +01:00
check_schema_version.sh [Build] Clean up CMake compiler flags and CI build script (#7219) 2026-11-07 18:37:09 +01:00
CMakeLists.txt [Server] Add a servatrice-dev executable on the in-memory database (#7864) 2026-11-10 12:16:36 +01:00
servatrice.desktop Servatrice: open in a terminal window when started from the menu 2014-10-11 13:38:07 +02:00
servatrice.ini.example [Server] Let users fetch their own private chat history (#7506) 2026-11-09 13:21:43 +01:00
servatrice.qrc Renamed resources 2014-10-07 16:49:40 +02:00
servatrice.rc Servatrice logo 2014-10-06 21:04:37 +02:00
servatrice.sql [Security] Add challenge-response auth with scrypt verifiers and stop storing plaintext passwords (#7193) 2026-10-16 22:52:26 +02:00