Skip to content

Commit

Permalink
fix: test sync that was giving false positives
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul Ghangas committed Mar 9, 2021
1 parent eff29a3 commit a18a187
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion peer/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,13 @@ var _ = Describe("Sync", func() {
defer cancel()
go peers[0].Run(ctx)
go func(ctx context.Context) {
once := false
transports[1].Receive(ctx, func(from id.Signatory, msg wire.Msg) error {
time.Sleep(2 * time.Second)
if !once {
once = true
return nil
}

if err := peers[1].Syncer().DidReceiveMessage(from, msg); err != nil {
return err
}
Expand Down

0 comments on commit a18a187

Please sign in to comment.