diff --git a/testing/filesharing/file_sharing_integration_test.go b/testing/filesharing/file_sharing_integration_test.go index c37f4c9..d24db99 100644 --- a/testing/filesharing/file_sharing_integration_test.go +++ b/testing/filesharing/file_sharing_integration_test.go @@ -52,8 +52,6 @@ func waitForPeerPeerConnection(t *testing.T, peera peer.CwtchPeer, peerb peer.Cw func TestFileSharing(t *testing.T) { - numGoRoutinesStart := runtime.NumGoroutine() - os.RemoveAll("cwtch.out.png") os.RemoveAll("cwtch.out.png.manifest") @@ -80,7 +78,10 @@ func TestFileSharing(t *testing.T) { if err != nil { t.Fatalf("Could not start Tor: %v", err) } + acn.WaitTillBootstrapped() + defer acn.Close() + numGoRoutinesStart := runtime.NumGoroutine() app := app2.NewApp(acn, "./storage") usr, _ := user.Current() @@ -162,8 +163,7 @@ func TestFileSharing(t *testing.T) { queueOracle.Shutdown() app.Shutdown() - acn.Close() - + time.Sleep(3 * time.Second) numGoRoutinesPostACN := runtime.NumGoroutine() // Printing out the current goroutines