(t *testing.T)
| 86 | } |
| 87 | |
| 88 | func TestInMemoryTaskStore_Cancellation(t *testing.T) { |
| 89 | store := NewInMemoryTaskStore() |
| 90 | task := NewTask("task-1", "context-1") |
| 91 | |
| 92 | // 添加取消信号 |
| 93 | store.AddCancellation(task.ID) |
| 94 | |
| 95 | // 检查取消状态 |
| 96 | canceled := store.IsCanceled(task.ID) |
| 97 | assert.True(t, canceled) |
| 98 | |
| 99 | // 移除取消信号 |
| 100 | store.RemoveCancellation(task.ID) |
| 101 | |
| 102 | // 再次检查 |
| 103 | canceled = store.IsCanceled(task.ID) |
| 104 | assert.False(t, canceled) |
| 105 | } |
| 106 | |
| 107 | func TestInMemoryTaskStore_Concurrency(t *testing.T) { |
| 108 | store := NewInMemoryTaskStore() |
nothing calls this directly
no test coverage detected