(t *testing.T, wb *WriteBack, running bool)
| 181 | } |
| 182 | |
| 183 | func assertTimerRunning(t *testing.T, wb *WriteBack, running bool) { |
| 184 | wb.mu.Lock() |
| 185 | if running { |
| 186 | assert.NotEqual(t, time.Time{}, wb.expiry) |
| 187 | assert.NotNil(t, wb.timer) |
| 188 | } else { |
| 189 | assert.Equal(t, time.Time{}, wb.expiry) |
| 190 | assert.Nil(t, wb.timer) |
| 191 | } |
| 192 | wb.mu.Unlock() |
| 193 | } |
| 194 | |
| 195 | func TestWriteBackResetTimer(t *testing.T) { |
| 196 | wb, cancel := newTestWriteBack(t) |
no test coverage detected
searching dependent graphs…