(t *testing.T)
| 286 | } |
| 287 | |
| 288 | func TestTask_ActiveBySession(t *testing.T) { |
| 289 | tm := NewTaskManager() |
| 290 | tm.Create("sess-1", 1, "exec") |
| 291 | tm.Create("sess-1", 2, "netstat") |
| 292 | tm.Create("sess-1", 3, "ls") |
| 293 | |
| 294 | tm.Complete("sess-1", 2) |
| 295 | |
| 296 | active := tm.ActiveBySession("sess-1") |
| 297 | if len(active) != 2 { |
| 298 | t.Errorf("ActiveBySession: got %d, want 2 (tasks 1 and 3)", len(active)) |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | func TestTask_Cleanup_RemovesStale(t *testing.T) { |
| 303 | tm := NewTaskManager() |
nothing calls this directly
no test coverage detected