subprocess-socket-tests
CommunityReliable subprocess TCP server testing patterns.
Authormlinnen
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Use this skill when tests spawn pumpkin_face.py or another TCP server in a subprocess and need deterministic readiness/cleanup across repeated runs.
Core Features & Use Cases
- Treat process-owned listening state as readiness: poll the child PID's listening ports instead of assuming "some process is listening" means the spawned server is ready.
- For command sockets that often return no payload, use a readiness teardown pattern where you ensure the server sees EOF and the client doesn't wait on a timeout.
- Centralize teardown in a helper (
stop_server) so every test path terminates the spawned process the same way. - Avoid readiness probes that consume the only pending TCP slot on a single-threaded server; if you must probe connectivity, do it after ownership is established or widen the server backlog.
Anti-Patterns
- Polling
localhost:5000until it opens without checking which PID owns the port. - Duplicating ad hoc
terminate()/wait()/kill()blocks in every test. - Expecting no-response commands to complete quickly while keeping the write side of the socket open.
Quick Start
Run a deterministic test by spawning the server in a subprocess and verify readiness via the child process's listening ports.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: subprocess-socket-tests Download link: https://github.com/mlinnen/mr-pumpkin/archive/main.zip#subprocess-socket-tests Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.