feat: add slow-time-server for timeout, resilience, and load testing#2865
Merged
crivetimihai merged 4 commits intomainfrom Feb 15, 2026
Merged
feat: add slow-time-server for timeout, resilience, and load testing#2865crivetimihai merged 4 commits intomainfrom
crivetimihai merged 4 commits intomainfrom
Conversation
369e7c6 to
011a65c
Compare
Implements #2783. A configurable-latency Go MCP server modelled on fast-time-server that introduces artificial delays on every tool call, serving as a testing target for gateway timeout enforcement, circuit breaker behaviour, session pool resilience, and load testing. Server features: - 5 MCP tools: get_slow_time, convert_slow_time, get_instant_time, get_timeout_time, get_flaky_time - 2 MCP resources: latency://config, latency://stats - 1 MCP prompt: test_timeout - 4 latency distributions: fixed, uniform, normal, exponential - Failure simulation with configurable rate and mode - Runtime reconfiguration via REST POST /api/v1/config - Invocation statistics with p50/p95/p99 percentiles - Multi-transport: stdio, SSE, Streamable HTTP, dual, REST - 32 unit tests with race detection, all passing Integration: - docker-compose.yml: testing profile (port 8889) + auto-registration - docker-compose-performance.yml: dedicated performance testing service - Locust load test with 4 scenarios (slow, timeout storm, mixed, circuit breaker) - Documentation in docs/docs/using/servers/go/slow-time-server.md Closes #2783 Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
- Fix healthcheck in docker-compose-performance.yml to use binary's built-in health check instead of curl (scratch image has no curl) - Replace mixed atomic+mutex with plain increments under mutex in invocationStats.record() for clarity - Remove dead generateTestTimeoutPrompt() function and unused strings import from rest_handlers.go - Remove unused json and uuid imports from locust test file - Align env var naming (SLOW_TIME_LATENCY) between compose files Closes #2783 Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
011a65c to
4760ea7
Compare
Member
Author
Review & RebaseRebased onto main (clean, no conflicts) and applied the following fixes: Bug fix
Code cleanup
Verification
|
The slow-time-server deliberately introduces latency and failures, which breaks existing tests when included in the testing profile. Move it to a dedicated 'resilience' profile so it must be explicitly opted into. - docker-compose.yml: profiles ["testing"] -> ["resilience"] - Makefile: add resilience-up/down/logs targets - docs: update profile references Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Member
Author
Profile isolationMoved Before: After: Slow-time-server requires explicit opt-in: # Resilience testing only
docker compose --profile resilience up -d
# Or combine with testing
docker compose --profile testing --profile resilience up -dAlso added Makefile targets: |
Add dedicated targets for running Locust and JMeter tests against the slow-time-server, ensuring these tests only run when explicitly invoked rather than as part of the regular testing profile. New targets: - resilience-locust: headless Locust run (10 users, 120s) - resilience-locust-ui: Locust web UI on port 8090 - resilience-jmeter: JMeter baseline (20 threads, 5min) Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
suciu-daniel
pushed a commit
that referenced
this pull request
Feb 16, 2026
…2865) * feat: add slow-time-server for timeout, resilience, and load testing Implements #2783. A configurable-latency Go MCP server modelled on fast-time-server that introduces artificial delays on every tool call, serving as a testing target for gateway timeout enforcement, circuit breaker behaviour, session pool resilience, and load testing. Server features: - 5 MCP tools: get_slow_time, convert_slow_time, get_instant_time, get_timeout_time, get_flaky_time - 2 MCP resources: latency://config, latency://stats - 1 MCP prompt: test_timeout - 4 latency distributions: fixed, uniform, normal, exponential - Failure simulation with configurable rate and mode - Runtime reconfiguration via REST POST /api/v1/config - Invocation statistics with p50/p95/p99 percentiles - Multi-transport: stdio, SSE, Streamable HTTP, dual, REST - 32 unit tests with race detection, all passing Integration: - docker-compose.yml: testing profile (port 8889) + auto-registration - docker-compose-performance.yml: dedicated performance testing service - Locust load test with 4 scenarios (slow, timeout storm, mixed, circuit breaker) - Documentation in docs/docs/using/servers/go/slow-time-server.md Closes #2783 Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix: address review issues in slow-time-server PR - Fix healthcheck in docker-compose-performance.yml to use binary's built-in health check instead of curl (scratch image has no curl) - Replace mixed atomic+mutex with plain increments under mutex in invocationStats.record() for clarity - Remove dead generateTestTimeoutPrompt() function and unused strings import from rest_handlers.go - Remove unused json and uuid imports from locust test file - Align env var naming (SLOW_TIME_LATENCY) between compose files Closes #2783 Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix: move slow-time-server to dedicated resilience profile The slow-time-server deliberately introduces latency and failures, which breaks existing tests when included in the testing profile. Move it to a dedicated 'resilience' profile so it must be explicitly opted into. - docker-compose.yml: profiles ["testing"] -> ["resilience"] - Makefile: add resilience-up/down/logs targets - docs: update profile references Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * feat: add Makefile targets for resilience load testing Add dedicated targets for running Locust and JMeter tests against the slow-time-server, ensuring these tests only run when explicitly invoked rather than as part of the regular testing profile. New targets: - resilience-locust: headless Locust run (10 users, 120s) - resilience-locust-ui: Locust web UI on port 8090 - resilience-jmeter: JMeter baseline (20 threads, 5min) Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> --------- Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
vishu-bh
pushed a commit
that referenced
this pull request
Feb 18, 2026
…2865) * feat: add slow-time-server for timeout, resilience, and load testing Implements #2783. A configurable-latency Go MCP server modelled on fast-time-server that introduces artificial delays on every tool call, serving as a testing target for gateway timeout enforcement, circuit breaker behaviour, session pool resilience, and load testing. Server features: - 5 MCP tools: get_slow_time, convert_slow_time, get_instant_time, get_timeout_time, get_flaky_time - 2 MCP resources: latency://config, latency://stats - 1 MCP prompt: test_timeout - 4 latency distributions: fixed, uniform, normal, exponential - Failure simulation with configurable rate and mode - Runtime reconfiguration via REST POST /api/v1/config - Invocation statistics with p50/p95/p99 percentiles - Multi-transport: stdio, SSE, Streamable HTTP, dual, REST - 32 unit tests with race detection, all passing Integration: - docker-compose.yml: testing profile (port 8889) + auto-registration - docker-compose-performance.yml: dedicated performance testing service - Locust load test with 4 scenarios (slow, timeout storm, mixed, circuit breaker) - Documentation in docs/docs/using/servers/go/slow-time-server.md Closes #2783 Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix: address review issues in slow-time-server PR - Fix healthcheck in docker-compose-performance.yml to use binary's built-in health check instead of curl (scratch image has no curl) - Replace mixed atomic+mutex with plain increments under mutex in invocationStats.record() for clarity - Remove dead generateTestTimeoutPrompt() function and unused strings import from rest_handlers.go - Remove unused json and uuid imports from locust test file - Align env var naming (SLOW_TIME_LATENCY) between compose files Closes #2783 Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix: move slow-time-server to dedicated resilience profile The slow-time-server deliberately introduces latency and failures, which breaks existing tests when included in the testing profile. Move it to a dedicated 'resilience' profile so it must be explicitly opted into. - docker-compose.yml: profiles ["testing"] -> ["resilience"] - Makefile: add resilience-up/down/logs targets - docs: update profile references Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * feat: add Makefile targets for resilience load testing Add dedicated targets for running Locust and JMeter tests against the slow-time-server, ensuring these tests only run when explicitly invoked rather than as part of the regular testing profile. New targets: - resilience-locust: headless Locust run (10 users, 120s) - resilience-locust-ui: Locust web UI on port 8090 - resilience-jmeter: JMeter baseline (20 threads, 5min) Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> --------- Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> Signed-off-by: Vishu Bhatnagar <vishu.bhatnagar@ibm.com>
kcostell06
pushed a commit
to kcostell06/mcp-context-forge
that referenced
this pull request
Feb 24, 2026
…BM#2865) * feat: add slow-time-server for timeout, resilience, and load testing Implements IBM#2783. A configurable-latency Go MCP server modelled on fast-time-server that introduces artificial delays on every tool call, serving as a testing target for gateway timeout enforcement, circuit breaker behaviour, session pool resilience, and load testing. Server features: - 5 MCP tools: get_slow_time, convert_slow_time, get_instant_time, get_timeout_time, get_flaky_time - 2 MCP resources: latency://config, latency://stats - 1 MCP prompt: test_timeout - 4 latency distributions: fixed, uniform, normal, exponential - Failure simulation with configurable rate and mode - Runtime reconfiguration via REST POST /api/v1/config - Invocation statistics with p50/p95/p99 percentiles - Multi-transport: stdio, SSE, Streamable HTTP, dual, REST - 32 unit tests with race detection, all passing Integration: - docker-compose.yml: testing profile (port 8889) + auto-registration - docker-compose-performance.yml: dedicated performance testing service - Locust load test with 4 scenarios (slow, timeout storm, mixed, circuit breaker) - Documentation in docs/docs/using/servers/go/slow-time-server.md Closes IBM#2783 Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix: address review issues in slow-time-server PR - Fix healthcheck in docker-compose-performance.yml to use binary's built-in health check instead of curl (scratch image has no curl) - Replace mixed atomic+mutex with plain increments under mutex in invocationStats.record() for clarity - Remove dead generateTestTimeoutPrompt() function and unused strings import from rest_handlers.go - Remove unused json and uuid imports from locust test file - Align env var naming (SLOW_TIME_LATENCY) between compose files Closes IBM#2783 Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix: move slow-time-server to dedicated resilience profile The slow-time-server deliberately introduces latency and failures, which breaks existing tests when included in the testing profile. Move it to a dedicated 'resilience' profile so it must be explicitly opted into. - docker-compose.yml: profiles ["testing"] -> ["resilience"] - Makefile: add resilience-up/down/logs targets - docs: update profile references Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * feat: add Makefile targets for resilience load testing Add dedicated targets for running Locust and JMeter tests against the slow-time-server, ensuring these tests only run when explicitly invoked rather than as part of the regular testing profile. New targets: - resilience-locust: headless Locust run (10 users, 120s) - resilience-locust-ui: Locust web UI on port 8090 - resilience-jmeter: JMeter baseline (20 threads, 5min) Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> --------- Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #2783. Adds a configurable-latency Go MCP server (
mcp-servers/go/slow-time-server/) modelled on fast-time-server that introduces artificial delays on every tool call. Serves as a testing target for gateway timeout enforcement, circuit breaker behaviour, session pool resilience, and load testing under realistic slow-tool conditions.get_slow_time,convert_slow_time,get_instant_time,get_timeout_time,get_flaky_timePOST /api/v1/configdocker-compose.yml(testing profile, port 8889) anddocker-compose-performance.ymldocs/docs/using/servers/go/slow-time-server.mdFiles
mcp-servers/go/slow-time-server/(main.go, rest_handlers.go, openapi.go, main_test.go, Makefile, Dockerfile, README.md)docker-compose.yml,docker-compose-performance.ymltests/loadtest/locustfile_slow_time_server.pydocs/docs/using/servers/go/slow-time-server.md,.pagesmcp-servers/AGENTS.mdTest plan
go test -race -timeout=90s ./...-- 32/32 passgo vet ./...-- cleango build-- cleandocker compose --profile testing config --services-- validates YAML, shows both new servicesCloses #2783