(t *testing.T)
| 192 | } |
| 193 | |
| 194 | func TestRuleRouter_ContextCanceled(t *testing.T) { |
| 195 | r := NewRuleRouter(testRouterConfig(), nil) |
| 196 | ctx, cancel := context.WithCancel(context.Background()) |
| 197 | cancel() |
| 198 | _, err := r.SelectRoute(ctx, types.AIRequest{ |
| 199 | TenantID: "team-a", |
| 200 | TaskType: "simple", |
| 201 | }, types.RuntimeState{}) |
| 202 | if err == nil { |
| 203 | t.Fatal("expected error from canceled context") |
| 204 | } |
| 205 | } |
nothing calls this directly
no test coverage detected