Skip to content

Commit

Permalink
fdafd
Browse files Browse the repository at this point in the history
  • Loading branch information
chu11 committed Oct 31, 2024
1 parent bed9d02 commit a21ae85
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/broker/test/overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <flux/core.h>
#include <zmq.h>

Expand Down Expand Up @@ -523,8 +524,22 @@ void test_create (flux_t *h,
* handler, and overlay_authorize() will fail if it doesn't
* exist.
*/
if (overlay_bind (ctx[0]->ov, uri) < 0)
BAIL_OUT ("%s: overlay_bind failed", ctx[0]->name);
while (1) {
if (overlay_bind (ctx[0]->ov, uri) < 0) {
/* There's a small chance bind from previous test
* not yet cleared, we'll retry until it works
*/
if (errno != EADDRINUSE)
BAIL_OUT ("%s: overlay_bind failed", ctx[0]->name);
usleep (100000);
ctx_destroy (ctx[rank]);
ctx[rank] = ctx_create (h, size, rank, NULL, recv_cb);
if (overlay_set_topology (ctx[rank]->ov, ctx[rank]->topo) < 0)
BAIL_OUT ("%s: overlay_set_topology failed", ctx[rank]->name);
continue;
}
break;
}
}
else {
if (overlay_authorize (ctx[0]->ov,
Expand Down

0 comments on commit a21ae85

Please sign in to comment.