File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -42,4 +42,30 @@ defmodule AgentForge.ExamplesTest do
4242 assert output =~ ~r/ data: "Job completed with result: \\ "Completed\\ ""/
4343 end
4444 end
45+
46+ describe "limited_workflow.exs" do
47+ test "demonstrates execution limits and statistics" do
48+ output = capture_io ( fn -> Code . eval_file ( "examples/limited_workflow.exs" ) end )
49+
50+ # Verify basic timeout example
51+ assert output =~ "--- Basic Example with Timeout ---"
52+ assert output =~ ~r/ Processing signal: task -> "Sample data"/
53+ assert output =~ ~r/ Result: processed -> "Sample data"/
54+
55+ # Verify statistics collection
56+ assert output =~ "--- Example with Statistics Collection ---"
57+ assert output =~ "Validating data..."
58+ assert output =~ "Transforming data..."
59+ assert output =~ "Finalizing..."
60+ assert output =~ ~r/ Result: completed -> "Test data \( transformed\) "/
61+ assert output =~ "Execution Statistics:"
62+
63+ # Verify timeout error handling
64+ assert output =~ "--- Example with Timeout Error ---"
65+ assert output =~ "Starting long process..."
66+ assert output =~ "Error handled gracefully: "
67+ assert output =~ "Timeout Statistics:"
68+ assert output =~ "- Completed: true"
69+ end
70+ end
4571end
You can’t perform that action at this time.
0 commit comments