commit 67a479d55d4bc9212287a430505cab81e794306a
parent 6bff99fe46be482d778bec2f2753a067e574db2d
Author: triesap <tyson@radroots.org>
Date: Mon, 21 Sep 2026 15:00:34 +0000
core: add bounded process soak testing
Diffstat:
2 files changed, 39 insertions(+), 0 deletions(-)
diff --git a/pixi.toml b/pixi.toml
@@ -30,6 +30,7 @@ test-jev = "mojo -I src -I tests tests/test_jev.mojo"
test-application = "mojo -I src -I tests tests/test_application.mojo"
test-stdio-session = "mojo -I src -I tests tests/test_persistent_stdio.mojo"
test-journeys = "mojo -I src -I tests tests/test_journeys.mojo"
+test-soak = "mojo -I src -I tests tests/test_soak.mojo"
test-spec = "mojo -I src -I tests tests/test_traceability.mojo"
check-build = "mkdir -p .pixi/build && mojo build -I src src/main.mojo -o .pixi/build/hyfd"
check-format = "sh tools/check_format.sh"
diff --git a/tests/test_soak.mojo b/tests/test_soak.mojo
@@ -0,0 +1,38 @@
+from std.collections import List
+from std.tempfile import TemporaryDirectory
+from std.testing import TestSuite, assert_equal, assert_true
+
+from fixture_assertions import load_scenario_request_json
+from hyf_runtime.startup import (
+ RuntimeStartupContext,
+ RuntimeStartupInput,
+ resolve_startup_context,
+)
+from hyf_stdio.server import run_stdio_session
+
+
+def _context(temp_dir: String) raises -> RuntimeStartupContext:
+ return resolve_startup_context(
+ RuntimeStartupInput(
+ env_paths_profile="repo_local",
+ env_repo_local_base_root=temp_dir,
+ user_home="/home/unused",
+ argv=List[String](),
+ )
+ )
+
+
+def test_bounded_process_soak_200_frames() raises:
+ with TemporaryDirectory() as temp_dir:
+ var context = _context(temp_dir)
+ var frames = List[String]()
+ for _ in range(200):
+ frames.append(load_scenario_request_json("scenarios/status_ok.json"))
+ var responses = run_stdio_session(frames, context)
+ assert_equal(len(responses), 200)
+ for response in responses:
+ assert_true(response.find('"ok":true') >= 0)
+
+
+def main() raises:
+ TestSuite.discover_tests[__functions_in_module()]().run()