Deployment and lifecycle management for Nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

test(sower): wait for async task in deploy_subscription policy test

The test did not await the spawned Task.Supervisor child, causing the
test process (DB sandbox owner) to exit while the task still held a
connection. Apply the same Process.monitor + assert_receive pattern used
by handle_deployment_request/2 tests.

sow-154

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

+4 -1
+4 -1
apps/sower/test/sower/orchestration_test.exs
··· 1503 1503 ] 1504 1504 }) 1505 1505 1506 - assert {:ok, _request_id, _pid} = 1506 + assert {:ok, _request_id, pid} = 1507 1507 Orchestration.deploy_subscription(sub, 1508 1508 actor_sid: "user_test", 1509 1509 event_reason: :user_triggered 1510 1510 ) 1511 + 1512 + ref = Process.monitor(pid) 1513 + assert_receive {:DOWN, ^ref, :process, ^pid, :normal}, 5000 1511 1514 end 1512 1515 end 1513 1516 end