MCPcopy
hub / github.com/perkeep/perkeep / TestThumbnailGenerateTimeout

Function TestThumbnailGenerateTimeout

internal/video/thumbnail/service_test.go:140–153  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

138}
139
140func TestThumbnailGenerateTimeout(t *testing.T) {
141
142 if _, err := exec.LookPath("bash"); err != nil {
143 t.Skip("bash not in PATH.")
144 }
145
146 store, ref := storageAndBlobRef(t)
147 service := NewService(sleepyThumbnailer{}, time.Duration(time.Millisecond), 5)
148 err := service.Generate(ref, io.Discard, store)
149
150 if err != errTimeout {
151 t.Errorf("expected to timeout: %v", err)
152 }
153}

Callers

nothing calls this directly

Calls 4

GenerateMethod · 0.95
storageAndBlobRefFunction · 0.85
NewServiceFunction · 0.85
LookPathMethod · 0.65

Tested by

no test coverage detected