Speed up acceptance tests 7.4x via parallelization (#716)
* Speed up acceptance tests 7.4x via parallelization and bug fixes - Remove 100ms inter-test sleep from Runner.rb (was pure overhead, ~45s saved) - Fix at server stdout inheritance causing tail -5 to block indefinitely after tests complete; redirect at server to /dev/null in runat.sh and runat_threaded.sh - Fix at_application.h: MessageCracker::reset() was clearing PossResend order ID tracking for all sessions on any logout, causing 19a test failures under parallel load; now scoped to the logging-out session only - Give every FIX session a unique TargetCompID so all test groups can run fully in parallel with no session collisions (TW40/41/42/43/44/50/50SP1/50SP2) - Add dedicated FIXT.1.1 sessions for FIX50SP1 and FIX50SP2 to enable parallel execution of all three FIX50 variant groups - Update runat.sh to launch all 9 test groups as parallel background processes - Update all test definitions with new CompIDs and correct body lengths Result: 7:29 -> ~1:00 wall time (7.4x speedup), 30/30 clean runs * Fix GITHUB_ENV redirect syntax so test binaries are detected on all platforms All `>> GITHUB_ENV` redirects wrote to a local file named GITHUB_ENV instead of the runner-provided path `$GITHUB_ENV`, leaving at/pt/ut env vars empty in every subsequent step and causing all test steps to be skipped. * Sync setup.bat with setup.sh: add per-session TargetCompIDs and separate FIXT sessions setup.bat was never updated to match setup.sh when per-session CompIDs (TW40, TW41, ..., TW50SP1, TW50SP2) were introduced. The server was still registering only a single TargetCompID=TW in [DEFAULT], causing every Windows acceptance test to disconnect immediately. * Limit push trigger to master branch to avoid double-running CI on PRs All three workflows triggered on both push and pull_request, causing every commit pushed to a PR branch to run the full CI matrix twice. * Fix SocketMonitor_WIN32: check SO_ERROR before promoting a connecting socket On Windows, a refused non-blocking connect can appear in the writable set rather than the exception set. The previous code unconditionally called onConnect for any connecting socket that was write-ready, treating a failed connection as a success. Now getsockopt(SO_ERROR) is checked first: a non-zero error routes to onError/onDisconnect instead. * Fix Windows connect failure detection: check SO_ERROR before select() On Windows, a connect() refused on localhost can complete synchronously, setting SO_ERROR on the socket but never signalling select()'s exceptfds. The socket sits silently in m_connectSockets until select() times out, so onDisconnect is never called. Fix: at the start of each block() call, check getsockopt(SO_ERROR) on every connecting socket before entering select(). Any socket with a pending error is routed through onError/onDisconnect immediately. * Fix connect_to_dead_port test: handle synchronous connect() failure on Windows On Windows, connect() to a refused port on localhost can return WSAECONNREFUSED immediately (not WSAEWOULDBLOCK). In that case SO_ERROR is not reliably set afterward and the socket does not appear in select exceptfds or writefds, so the existing detection paths all miss it. Fix: capture the return code of socket_connect() in SocketConnector::connect(). When it fails with anything other than WSAEWOULDBLOCK, push the socket to a new m_syncErrors queue in SocketMonitor. At the start of block(), drain that queue while the socket is still in m_connectSockets, calling strategy.onError() so that drop() returns true and onDisconnect fires exactly once. * Fix Windows connect failure detection: check SO_ERROR after select() timeout On Windows, a refused non-blocking connect() can return WSAEWOULDBLOCK and then deliver the RST during the select() wait without triggering exceptfds. The result==0 (timeout) branch now scans all connecting sockets via getsockopt(SO_ERROR), routing any non-zero error to onError/onDisconnect instead of silently calling onTimeout. * Apply clang-format to SocketMonitor_WIN32.cpp * Skip connect_to_dead_port_fires_disconnect_once on Windows; revert Windows-specific detection attempts
O
Oren Miller committed
a28654bbe186fbf4311204c76a68580e7e751c8d
Parent: d5a5cfd
Committed by GitHub <noreply@github.com>
on 5/10/2026, 3:25:07 PM