MCPcopy
hub / github.com/rclone/rclone / newTestWriteBack

Function newTestWriteBack

vfs/vfscache/writeback/writeback_test.go:21–27  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19)
20
21func newTestWriteBack(t *testing.T) (wb *WriteBack, cancel func()) {
22 ctx, cancel := context.WithCancel(context.Background())
23 opt := vfscommon.Opt
24 opt.WriteBack = fs.Duration(100 * time.Millisecond)
25 wb = New(ctx, &opt)
26 return wb, cancel
27}
28
29// string for debugging - make a copy and pop the items out in order
30func (wb *WriteBack) string(t *testing.T) string {

Callers 14

TestWriteBackItemCRUDFunction · 0.85
TestWriteBackResetTimerFunction · 0.85
TestWriteBackAddOKFunction · 0.85
TestWriteBackAddUpdateFunction · 0.85
TestWriteBackGetStatsFunction · 0.85
TestWriteBackQueueFunction · 0.85
TestWriteBackSetExpiryFunction · 0.85
TestWriteBackMaxQueueFunction · 0.85
TestWriteBackRenameFunction · 0.85

Calls 2

DurationTypeAlias · 0.92
NewFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…