Nicer test Scheduling
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Sarah Jamie Lewis 2023-08-29 12:26:51 -07:00
parent 407902b8ee
commit 75a3c14285
1 changed files with 3 additions and 2 deletions

View File

@ -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
// go test scheduling doesn't like that and even sleeping long periods won't cause the event thread to make
// progress...
for {
setup := false;
for !setup {
if pinf, exists := cr.connections.Load(testOnion); exists {
if pinf.(*contact).queued {
if _, exists := cr.authorizedPeers.Load(testOnion); exists {
t.Logf("authorized")
break
setup = true;
}
}
}