MCPcopy
hub / github.com/rclone/rclone / assertTimerRunning

Function assertTimerRunning

vfs/vfscache/writeback/writeback_test.go:183–193  ·  view source on GitHub ↗
(t *testing.T, wb *WriteBack, running bool)

Source from the content-addressed store, hash-verified

181}
182
183func 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
195func TestWriteBackResetTimer(t *testing.T) {
196 wb, cancel := newTestWriteBack(t)

Callers 2

TestWriteBackResetTimerFunction · 0.85
TestWriteBackMaxQueueFunction · 0.85

Calls 3

LockMethod · 0.65
UnlockMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…