(t *testing.T)
| 100 | } |
| 101 | |
| 102 | func TestReflectorResyncChan(t *testing.T) { |
| 103 | s := NewStore(MetaNamespaceKeyFunc) |
| 104 | g := NewReflector(&testLW{}, &v1.Pod{}, s, time.Millisecond) |
| 105 | a, _ := g.resyncChan() |
| 106 | b := time.After(wait.ForeverTestTimeout) |
| 107 | select { |
| 108 | case <-a: |
| 109 | t.Logf("got timeout as expected") |
| 110 | case <-b: |
| 111 | t.Errorf("resyncChan() is at least 99 milliseconds late??") |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | func BenchmarkReflectorResyncChanMany(b *testing.B) { |
| 116 | s := NewStore(MetaNamespaceKeyFunc) |
nothing calls this directly
no test coverage detected