all: Implement suture v4-api (#6947)
This commit is contained in:
@@ -200,8 +200,9 @@ func TestGlobalAnnounce(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
go disco.Serve()
|
||||
defer disco.Stop()
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
go disco.Serve(ctx)
|
||||
defer cancel()
|
||||
|
||||
// The discovery thing should attempt an announcement immediately. We wait
|
||||
// for it to succeed, a while.
|
||||
@@ -223,8 +224,9 @@ func testLookup(url string) ([]string, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
go disco.Serve()
|
||||
defer disco.Stop()
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
go disco.Serve(ctx)
|
||||
defer cancel()
|
||||
|
||||
return disco.Lookup(context.Background(), protocol.LocalDeviceID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user