--------------------------------------------------------------------------- putToFuzzy ---------------------------------------------------------------------------
(t *testing.T)
| 548 | // --------------------------------------------------------------------------- |
| 549 | |
| 550 | func TestPutToFuzzy_Normal(t *testing.T) { |
| 551 | ctx, cancel := context.WithCancel(context.Background()) |
| 552 | defer cancel() |
| 553 | pool := newTestBasePool(ctx, cancel) |
| 554 | |
| 555 | pool.putToFuzzy(newTestBaseline()) |
| 556 | |
| 557 | select { |
| 558 | case bl := <-pool.FuzzyCh: |
| 559 | if !bl.IsFuzzy { |
| 560 | t.Fatal("IsFuzzy should be true") |
| 561 | } |
| 562 | if bl.IsValid { |
| 563 | t.Fatal("fuzzy output snapshot should not stay valid") |
| 564 | } |
| 565 | case <-time.After(time.Second): |
| 566 | t.Fatal("putToFuzzy: receive timed out") |
| 567 | } |
| 568 | pool.Outwg.Done() |
| 569 | pool.Outwg.Wait() |
| 570 | } |
| 571 | |
| 572 | func TestPutToFuzzySnapshotsBaseline(t *testing.T) { |
| 573 | ctx, cancel := context.WithCancel(context.Background()) |
nothing calls this directly
no test coverage detected