Kill all Tor Connections at end of Integ Test
This commit is contained in:
parent
a0ea927a08
commit
93c562097a
|
@ -333,13 +333,16 @@ func TestCwtchPeerIntegration(t *testing.T) {
|
||||||
time.Sleep(2 * time.Second)
|
time.Sleep(2 * time.Second)
|
||||||
|
|
||||||
t.Logf("Done shutdown: %v\n", runtime.NumGoroutine())
|
t.Logf("Done shutdown: %v\n", runtime.NumGoroutine())
|
||||||
numGoRoutinesPostAppShutdown := runtime.NumGoroutine()
|
|
||||||
|
|
||||||
t.Logf("Shutting down ACN...")
|
t.Logf("Shutting down ACN...")
|
||||||
|
acn.Restart() // kill all active tor connections...
|
||||||
// acn.Close() TODO: ACN Now gets closed automatically with defer...attempting to close twice results in a dead lock...
|
// acn.Close() TODO: ACN Now gets closed automatically with defer...attempting to close twice results in a dead lock...
|
||||||
time.Sleep(time.Second * 2) // Server ^^ has a 5 second loop attempting reconnect before exiting
|
|
||||||
time.Sleep(time.Second * 30) // the network status plugin might keep goroutines alive for a minute before killing them
|
time.Sleep(time.Second * 30) // the network status plugin might keep goroutines alive for a minute before killing them
|
||||||
|
|
||||||
|
|
||||||
|
numGoRoutinesPostAppShutdown := runtime.NumGoroutine()
|
||||||
|
|
||||||
|
|
||||||
// Printing out the current goroutines
|
// Printing out the current goroutines
|
||||||
// Very useful if we are leaking any.
|
// Very useful if we are leaking any.
|
||||||
pprof.Lookup("goroutine").WriteTo(os.Stdout, 1)
|
pprof.Lookup("goroutine").WriteTo(os.Stdout, 1)
|
||||||
|
|
Loading…
Reference in New Issue