|
|
|
@ -260,7 +260,7 @@ func TestCwtchPeerIntegration(t *testing.T) {
|
|
|
|
|
log.Infoln("Alice joining server...")
|
|
|
|
|
if serverOnion, err := alice.AddServer(string(serverKeyBundle)); err != nil {
|
|
|
|
|
if len(cachedTokens) > len(aliceLines) {
|
|
|
|
|
alice.LoadCachedTokens(serverOnion, cachedTokens[0:len(aliceLines)])
|
|
|
|
|
alice.StoreCachedTokens(serverOnion, cachedTokens[0:len(aliceLines)])
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
t.Fatalf("Failed to Add Server Bundle %v", err)
|
|
|
|
@ -295,7 +295,7 @@ func TestCwtchPeerIntegration(t *testing.T) {
|
|
|
|
|
err = bob.ImportBundle(overlayMessage.Data)
|
|
|
|
|
log.Infof("Result of Bob Importing the Bundle from Alice: %v", err)
|
|
|
|
|
if len(cachedTokens) > (usedTokens + len(bobLines)) {
|
|
|
|
|
bob.LoadCachedTokens(ServerAddr, cachedTokens[usedTokens:usedTokens+len(bobLines)])
|
|
|
|
|
bob.StoreCachedTokens(ServerAddr, cachedTokens[usedTokens:usedTokens+len(bobLines)])
|
|
|
|
|
usedTokens += len(bobLines)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -324,7 +324,7 @@ func TestCwtchPeerIntegration(t *testing.T) {
|
|
|
|
|
log.Infof("Waiting for Carol to join connect to group server...")
|
|
|
|
|
carolGroupConversationID := 3
|
|
|
|
|
if len(cachedTokens) > (usedTokens + len(carolLines)) {
|
|
|
|
|
carol.LoadCachedTokens(ServerAddr, cachedTokens[usedTokens:usedTokens+len(carolLines)])
|
|
|
|
|
carol.StoreCachedTokens(ServerAddr, cachedTokens[usedTokens:usedTokens+len(carolLines)])
|
|
|
|
|
}
|
|
|
|
|
waitForConnection(t, carol, ServerAddr, connections.SYNCED)
|
|
|
|
|
numGoRoutinesPostCarolConnect := runtime.NumGoroutine()
|
|
|
|
@ -394,7 +394,7 @@ func TestCwtchPeerIntegration(t *testing.T) {
|
|
|
|
|
pprof.Lookup("goroutine").WriteTo(os.Stdout, 1)
|
|
|
|
|
|
|
|
|
|
log.Infof("numGoRoutinesStart: %v\nnumGoRoutinesPostAppStart: %v\nnumGoRoutinesPostPeerStart: %v\nnumGoRoutinesPostPeerAndServerConnect: %v\n"+
|
|
|
|
|
"numGoRoutinesPostAlice: %v\nnumGoRoutinesPostCarolConnect: %v\nnumGoRoutinesPostBob: %v\nnumGoRoutinesPostCarol: %v\nnumGoRoutinesPostAppShutdown: %v",
|
|
|
|
|
"numGoRoutinesPostAlice: %v\nnumGoRoutinesPostCarolConnect: %v\nnumGoRoutinesPostBob: %v\nnumGoRoutinesPostCarol: %v\nnumGoRoutinesPostAppShutdown: %v",
|
|
|
|
|
numGoRoutinesStart, numGoRoutinesPostAppStart, numGoRoutinesPostPeerStart, numGoRoutinesPostServerConnect,
|
|
|
|
|
numGoRoutinesPostAlice, numGoRoutinesPostCarolConnect, numGoRoutinesPostBob, numGoRoutinesPostCarol, numGoRoutinesPostAppShutdown)
|
|
|
|
|
|
|
|
|
|