SS14 Tests PoolManager
An in-depth guide to the SS14 integration test framework: PoolManager, TestPair lifecycle, server/client synchronization, action emulation and pitfalls.
by makura-games★ 74 GitHub stars
Install SS14 Tests PoolManager in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
SS14 Integration Test Framework
When to use
Use this skill when needed:
- understand how
PoolManagerand reusing server/client pairs actually work; - it is safe to configure
PoolSettingsandPairSettings; - correctly synchronize server and client ticks;
- emulate player actions (input, UI, BUI, interactions);
- analyze typical pool problems and flaky behavior.
If the task is specifically about designing and writing a new test as a product, use a separate skill ss14-tests-authoring. Here the focus is only on the infrastructure and execution mechanics.
Quality filter before transferring the pattern to work:
- do not use examples older than 2 years;
- do not use fragments that contain TODO/problematic comments on the test topic;
- if in doubt, choose a more recent and lower-level example from the engine.
Pool model: what is important to remember :)
PairSettings sets the couple’s life policy:
Destructive: the test can “break” the pair.Fresh: require a new pair.Connected: whether an active client↔server session is needed.NoLoadTestPrototypes: Don't load test prototypes (expensive and not reusable).Dirty: disables fast-recycle.
Critical calculated properties:
public virtual bool MustNotBeReused => Destructive || NoLoadTestPrototypes;
public virtual bool MustBeNew => Fresh || NoLoadTestPrototypes;
Consequence:
MustBeNew == true=> the pool creates a new pair;MustNotBeReused == true=> the pair after the test is not returned to reuse.
How PoolManager selects and prepares a pair
The algorithm is essentially this:
- If
MustBeNew, a new pair is created. - Otherwise, a suitable one is taken from the pool.
- If
CanFastRecycle(...) == true, onlyApplySettings(...)applies. - Otherwise, the full
RecycleInternal(...)is executed. - After the pair is issued, stabilization ticks and tick delta synchronization are run.
Practical conclusion:
- even after a “quick” return, immediate stability cannot be assumed;
- after critical operations,
RunTicksSync(...)andSyncTicks(...)are always appropriate.
Lifecycle couples and return to the pool ⚠️
Correct way:
- Take a pair.
- Execute the script.
- Call
CleanReturnAsync().
What CleanReturnAsync() does:
Cleanup()pairs;- clearing/returning changed CVars;
- checking that client/server are alive (if the test is not destructive);
- check runtime exceptions;
- transfer the pair to
Readyor complete destruction if reuse is prohibited.
If you don't call CleanReturnAsync(), dirty-dispose will work via DisposeAsync():
- the pair is destroyed;
- a warning appears;
- the performance and stability of the test run degrades.
Server/client: correct execution contract
IIntegrationInstance has strict discipline:
WaitPost(...)/Post(...): mutations only.WaitAssertion(...)/Assert(...): checks andAssert.That(...).WaitIdleAsync(): ensures that the queue is processed.
Responsibilities cannot be mixed:
- assertions inside
Post(...)give noisy and hard to read crashes; - mutations in
WaitAssertion(...)break the cause-and-effect model of the test.
Specificity of PoolSettings in content
Setting options in content integration tests:
InLobby = trueautomatically requires connected state.DummyTickeris used for an easier mode without full round-flow.Dirty = trueis needed if the test changes the state of the round, readiness, lobby phases, etc.AdminLogsEnabledenable only when the test actually checks the admin logs.
CanFastRecycle in the content additionally takes into account:
DummyTicker,Map,InLobby.
Emulate player actions
1) Enter (keybind)
In production code this is done through ClientFullInputCmdMessage and InputSystem.HandleInputCommand(...).
// Emulation of pressing keybind in a client instance.
var funcId = inputManager.NetworkBindMap.KeyFunctionID(ContentKeyFunctions.TryPullObject);
var msg = new ClientFullInputCmdMessage(client.Timing.CurTick, client.Timing.TickFraction, funcId)
{
State = BoundKeyState.Down,
Coordinates = client.EntMan.GetCoordinates(targetCoords),
Uid = client.EntMan.GetEntity(targetNetEntity),
};
await client.WaitPost(() =>
{
inputSystem.HandleInputCommand(clientSession, ContentKeyFunctions.TryPullObject, msg);
});
2) Click on the UI control
The standard way is to send Down + Up via GUIBoundKeyEventArgs and DoGuiEvent(...):
// Pressed the button.
await client.DoGuiEvent(control, downArgs);
await pair.RunTicksSync(1);
// Released the button.
await client.DoGuiEvent(control, upArgs);
await pair.RunTicksSync(1);
3) BUI message
After SendMessage(...) they usually give additional ticks for round-trip client↔server:
await client.WaitPost(() => bui.SendMessage(msg));
await pair.RunTicksSync(15); // handling reserve on both sides
4) Server interaction directly
For low-level interaction
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the SS14 Tests PoolManager skill do?
An in-depth guide to the SS14 integration test framework: PoolManager, TestPair lifecycle, server/client synchronization, action emulation and pitfalls.
How do I install the SS14 Tests PoolManager skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the SS14 Tests PoolManager skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…