Nicer test Scheduling
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
407902b8ee
commit
75a3c14285
|
@ -33,12 +33,13 @@ func TestContactRetryQueue(t *testing.T) {
|
||||||
// This is the worst part of this test setup. Ideally we would sleep, or some other yielding, but
|
// This is the worst part of this test setup. Ideally we would sleep, or some other yielding, but
|
||||||
// go test scheduling doesn't like that and even sleeping long periods won't cause the event thread to make
|
// go test scheduling doesn't like that and even sleeping long periods won't cause the event thread to make
|
||||||
// progress...
|
// progress...
|
||||||
for {
|
setup := false;
|
||||||
|
for !setup {
|
||||||
if pinf, exists := cr.connections.Load(testOnion); exists {
|
if pinf, exists := cr.connections.Load(testOnion); exists {
|
||||||
if pinf.(*contact).queued {
|
if pinf.(*contact).queued {
|
||||||
if _, exists := cr.authorizedPeers.Load(testOnion); exists {
|
if _, exists := cr.authorizedPeers.Load(testOnion); exists {
|
||||||
t.Logf("authorized")
|
t.Logf("authorized")
|
||||||
break
|
setup = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue