diff options
Diffstat (limited to 'git_test.go')
| -rw-r--r-- | git_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/git_test.go b/git_test.go index 1c57f79..101350f 100644 --- a/git_test.go +++ b/git_test.go @@ -13,6 +13,10 @@ import ( func TestMain(m *testing.M) { ret := m.Run() + if err := unregisterManagedTransports(); err != nil { + panic(err) + } + // Ensure that we are not leaking any pointer handles. pointerHandles.Lock() if len(pointerHandles.handles) > 0 { @@ -23,6 +27,16 @@ func TestMain(m *testing.M) { } pointerHandles.Unlock() + // Or remote pointers. + remotePointers.Lock() + if len(remotePointers.pointers) > 0 { + for ptr, remote := range remotePointers.pointers { + fmt.Printf("%016p: %+v\n", ptr, remote) + } + panic("remote pointer list not empty") + } + remotePointers.Unlock() + Shutdown() os.Exit(ret) |
