(t *testing.T)
| 303 | } |
| 304 | |
| 305 | func TestDeltaFIFO_UpdateResyncRace(t *testing.T) { |
| 306 | f := NewDeltaFIFO( |
| 307 | testFifoObjectKeyFunc, |
| 308 | keyLookupFunc(func() []testFifoObject { |
| 309 | return []testFifoObject{mkFifoObj("foo", 5)} |
| 310 | }), |
| 311 | ) |
| 312 | f.Update(mkFifoObj("foo", 6)) |
| 313 | f.Resync() |
| 314 | |
| 315 | expectedList := []Deltas{ |
| 316 | {{Updated, mkFifoObj("foo", 6)}}, |
| 317 | } |
| 318 | |
| 319 | for _, expected := range expectedList { |
| 320 | cur := Pop(f).(Deltas) |
| 321 | if e, a := expected, cur; !reflect.DeepEqual(e, a) { |
| 322 | t.Errorf("Expected %#v, got %#v", e, a) |
| 323 | } |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | func TestDeltaFIFO_HasSyncedCorrectOnDeletion(t *testing.T) { |
| 328 | f := NewDeltaFIFO( |
nothing calls this directly
no test coverage detected