| 1 | package main |
| 2 | |
| 3 | import ( |
| 4 | "reasonix/internal/control" |
| 5 | "testing" |
| 6 | "time" |
| 7 | ) |
| 8 | |
| 9 | func closeRemoteTestController(t *testing.T, ctrl *control.Controller) { |
| 10 | t.Helper() |
| 11 | ctrl.Close() |
| 12 | select { |
| 13 | case <-ctrl.Closed(): |
| 14 | case <-time.After(10 * time.Second): |
| 15 | t.Error("controller teardown did not finish before temporary-directory cleanup") |
| 16 | } |
| 17 | } |
| 18 |