info->debug fixes; rearrange integ test wait for connections for hopeful speed improvement
This commit is contained in:
parent
321b08bfd3
commit
06d402c4d7
|
@ -327,7 +327,7 @@ func (cr *contactRetry) handleEvent(id string, state connections.ConnectionState
|
|||
|
||||
pinf, _ := cr.connections.Load(id)
|
||||
p := pinf.(*contact)
|
||||
log.Infof(" managing state change for %v %v to %v by self %v", id, connections.ConnectionStateName[p.state], connections.ConnectionStateName[state], cr.onion)
|
||||
log.Debugf(" managing state change for %v %v to %v by self %v", id, connections.ConnectionStateName[p.state], connections.ConnectionStateName[state], cr.onion)
|
||||
if state == connections.DISCONNECTED || state == connections.FAILED || state == connections.KILLED {
|
||||
if p.state == connections.SYNCED || p.state == connections.AUTHENTICATED {
|
||||
p.lastSeen = time.Now()
|
||||
|
|
|
@ -1015,7 +1015,7 @@ func (cp *cwtchPeer) Listen() {
|
|||
cp.mutex.Lock()
|
||||
defer cp.mutex.Unlock()
|
||||
if !cp.listenStatus {
|
||||
log.Infof("cwtchPeer Listen sending ProtocolEngineStartListen\n")
|
||||
log.Debugf("cwtchPeer Listen sending ProtocolEngineStartListen\n")
|
||||
cp.listenStatus = true
|
||||
onion, _ := cp.storage.LoadProfileKeyValue(TypeAttribute, attr.PublicScope.ConstructScopedZonedPath(attr.ProfileZone.ConstructZonedPath(constants.Onion)).ToString())
|
||||
cp.eventBus.Publish(event.NewEvent(event.ProtocolEngineStartListen, map[event.Field]string{event.Onion: string(onion)}))
|
||||
|
|
|
@ -267,9 +267,6 @@ func TestCwtchPeerIntegration(t *testing.T) {
|
|||
t.Fatalf("Failed to Add Server Bundle %v", err)
|
||||
}
|
||||
|
||||
log.Infof("Waiting for alice to join server...")
|
||||
waitForConnection(t, alice, ServerAddr, connections.SYNCED)
|
||||
|
||||
// Creating a Group
|
||||
log.Infof("Creating group on %v...", ServerAddr)
|
||||
aliceGroupConversationID, err := alice.StartGroup("Our Cool Testing Group", ServerAddr)
|
||||
|
@ -300,6 +297,8 @@ func TestCwtchPeerIntegration(t *testing.T) {
|
|||
usedTokens += len(bobLines)
|
||||
}
|
||||
|
||||
log.Infof("Waiting for alice to join server...")
|
||||
waitForConnection(t, alice, ServerAddr, connections.SYNCED)
|
||||
log.Infof("Waiting for Bob to join connect to group server...")
|
||||
waitForConnection(t, bob, ServerAddr, connections.SYNCED)
|
||||
|
||||
|
|
Loading…
Reference in New Issue