Add mutex logging

This commit is contained in:
Audrius Butkevicius
2015-04-22 23:54:31 +01:00
parent 9ee3541655
commit 433b923ea7
31 changed files with 277 additions and 78 deletions

View File

@@ -9,12 +9,13 @@ package discover
import (
"fmt"
"net"
"sync"
"time"
"testing"
"github.com/syncthing/protocol"
"github.com/syncthing/syncthing/internal/sync"
)
var device protocol.DeviceID
@@ -97,7 +98,7 @@ func TestUDP4Success(t *testing.T) {
// Do a lookup in a separate routine
addrs := []string{}
wg := sync.WaitGroup{}
wg := sync.NewWaitGroup()
wg.Add(1)
go func() {
addrs = client.Lookup(device)
@@ -193,7 +194,7 @@ func TestUDP4Failure(t *testing.T) {
// Do a lookup in a separate routine
addrs := []string{}
wg := sync.WaitGroup{}
wg := sync.NewWaitGroup()
wg.Add(1)
go func() {
addrs = client.Lookup(device)