MCPcopy Create free account
hub / github.com/devld/go-drive / newPoolTestVM

Function newPoolTestVM

script/pool_test.go:18–26  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

16}
17
18func newPoolTestVM(t *testing.T) *VM {
19 t.Helper()
20 vm, e := NewVM()
21 if e != nil {
22 t.Fatal(e)
23 }
24 t.Cleanup(func() { _ = vm.Dispose() })
25 return vm
26}
27
28func TestVMPoolWaitsForAvailableVM(t *testing.T) {
29 pool := NewVMPool(newPoolTestVM(t), &VMPoolConfig{MaxTotal: 1, MaxIdle: 1})

Calls 2

DisposeMethod · 0.95
NewVMFunction · 0.85

Tested by

no test coverage detected