mirror of
https://github.com/logos-messaging/logos-messaging-go-bindings.git
synced 2026-01-02 14:03:10 +00:00
improve sleep and add debug logs
This commit is contained in:
parent
6314223966
commit
d44007a30e
@ -138,7 +138,7 @@ func WaitForAutoConnection(nodeList []*WakuNode) error {
|
||||
}
|
||||
|
||||
// Wait for the protocol connections to settle
|
||||
time.Sleep(2 * time.Second)
|
||||
time.Sleep(1 * time.Second)
|
||||
Debug("Auto-connection check completed successfully")
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -1181,12 +1181,20 @@ func TestStoredDuplicateMessage(t *testing.T) {
|
||||
err = WaitForAutoConnection([]*WakuNode{node1, node2})
|
||||
require.NoError(t, err, "Nodes did not connect within timeout")
|
||||
|
||||
peers1, err := node1.GetConnectedPeers()
|
||||
require.NoError(t, err, "failed getting node1's peers")
|
||||
fmt.Println("---------- node1 connected peers: ", peers1)
|
||||
|
||||
queryTimestamp := proto.Int64(time.Now().UnixNano())
|
||||
var msg = node1.CreateMessage()
|
||||
Debug("Node1 is publishing two identical messages")
|
||||
_, err = node1.RelayPublishNoCTX(DefaultPubsubTopic, msg)
|
||||
require.NoError(t, err, "Failed to publish first message")
|
||||
|
||||
peers2, err := node2.GetConnectedPeers()
|
||||
require.NoError(t, err, "failed getting node2's peers")
|
||||
fmt.Println("---------- node2 connected peers: ", peers2)
|
||||
|
||||
_, err = node2.RelayPublishNoCTX(DefaultPubsubTopic, msg)
|
||||
require.NoError(t, err, "Failed to publish second message")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user