Skip to content

Commit

Permalink
test/reduce: construct fake tbon attrs
Browse files Browse the repository at this point in the history
Add fake attributes for tbon.level and tbon.maxlevel so
flux_reduce_create() can succeed in FLUX_REDUCE_TIMEDFLUSH
mode when the handle is was opened on the loop connector.
  • Loading branch information
garlick committed Jun 8, 2016
1 parent 5beb163 commit 8e9884d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions t/loop/reduce.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ void test_timed (flux_t h)
ok ((r = flux_reduce_create (h, reduce_ops, 0.1, NULL,
FLUX_REDUCE_TIMEDFLUSH)) != NULL,
"timed: flux_reduce_create works");
if (!r)
BAIL_OUT();
ok (flux_reduce_opt_get (r, FLUX_REDUCE_OPT_TIMEOUT, &timeout,
sizeof (timeout)) == 0 && timeout == 0.1,
"timed: timeout scaled by 1.0 on rank 0");
Expand Down Expand Up @@ -351,6 +353,10 @@ int main (int argc, char *argv[])
if (!h)
BAIL_OUT ("can't continue without loop handle");

flux_attr_fake (h, "rank", "0", FLUX_ATTRFLAG_IMMUTABLE);
flux_attr_fake (h, "tbon.level", "0", FLUX_ATTRFLAG_IMMUTABLE);
flux_attr_fake (h, "tbon.maxlevel", "0", FLUX_ATTRFLAG_IMMUTABLE);

test_nopolicy (h); // 6
test_hwm (h); // 37
test_timed(h); // 18
Expand Down

0 comments on commit 8e9884d

Please sign in to comment.