(t *testing.T)
| 217 | } |
| 218 | |
| 219 | func TestSetAbortError_StoresFirstError(t *testing.T) { |
| 220 | ctx := NewMigrationContext() |
| 221 | |
| 222 | err1 := errors.New("first error") |
| 223 | err2 := errors.New("second error") |
| 224 | |
| 225 | ctx.SetAbortError(err1) |
| 226 | ctx.SetAbortError(err2) |
| 227 | |
| 228 | got := ctx.GetAbortError() |
| 229 | if got != err1 { //nolint:errorlint // Testing pointer equality for sentinel error |
| 230 | t.Errorf("Expected first error %v, got %v", err1, got) |
| 231 | } |
| 232 | } |
| 233 | |
| 234 | func TestSetAbortError_ThreadSafe(t *testing.T) { |
| 235 | ctx := NewMigrationContext() |
nothing calls this directly
no test coverage detected
searching dependent graphs…