more clear errors

pull/451/head
Dan Ballard 4 months ago
parent 2183c0b051
commit 7c753437f9
  1. 9
      testing/cwtch_peer_server_integration_test.go

@ -369,7 +369,8 @@ func checkSendMessageToGroup(t *testing.T, profile peer.CwtchPeer, id int, messa
log.Infof("%v> %v\n", name, message)
_, err := profile.SendMessage(id, message)
if err != nil {
t.Fatalf("Alice failed to send a message to the group: %v", err)
log.Errorf("Alice failed to send a message to the group: %v", err)
t.Fatalf("Alice failed to send a message to the group: %v\n", err)
}
time.Sleep(time.Second * 10)
}
@ -378,9 +379,11 @@ func checkSendMessageToGroup(t *testing.T, profile peer.CwtchPeer, id int, messa
func checkMessage(t *testing.T, profile peer.CwtchPeer, id int, messageID int, expected string) {
message, _, err := profile.GetChannelMessage(id, 0, messageID)
if err != nil {
t.Fatalf("unexpected message %v expected: %v got error: %v", profile.GetOnion(), expected, err)
log.Errorf("unexpected message %v expected: %v got error: %v", profile.GetOnion(), expected, err)
t.Fatalf("unexpected message %v expected: %v got error: %v\n", profile.GetOnion(), expected, err)
}
if message != expected {
t.Fatalf("unexpected message %v expected: %v got: [%v]", profile.GetOnion(), expected, message)
log.Errorf("unexpected message %v expected: %v got: [%v]", profile.GetOnion(), expected, message)
t.Fatalf("unexpected message %v expected: %v got: [%v]\n", profile.GetOnion(), expected, message)
}
}

Loading…
Cancel
Save