From a973548e3a38ef5be1bb4213c29f27da025618ab Mon Sep 17 00:00:00 2001 From: "Dong H. Ahn" Date: Thu, 19 Apr 2018 15:55:28 -0700 Subject: [PATCH] test: Fix a race condition bug in a node exclusion test wait-job now waits until the last job gets backfilled and running. This way, "flux wreck exclude" is guaranteed to happen after cab1235 resource gets two reservations. --- t/t1007-exclude.t | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/t/t1007-exclude.t b/t/t1007-exclude.t index fd3de3160..51a09f4ce 100755 --- a/t/t1007-exclude.t +++ b/t/t1007-exclude.t @@ -78,15 +78,15 @@ test_expect_success 'excluding a node with reservations works' ' adjust_session_info 4 && flux module remove sched && flux module load sched sched-once=true node-excl=true plugin=sched.backfill && - timed_wait_job 5 submitted && - flux submit -N 4 sleep 0 && - flux submit -N 4 sleep 0 && + timed_wait_job 5 running && + flux submit -N 3 sleep 0 && flux submit -N 4 sleep 0 && flux submit -N 4 sleep 0 && + flux submit -N 1 sleep 0 && timed_sync_wait_job 10 && flux wreck exclude -k cab1235 && - state=$(flux kvs get -j $(job_kvs_path 7).state) && - test ${state} = "complete" + state=$(flux kvs get -j $(job_kvs_path 8).state) && + test ${state} = "submitted" ' test_expect_success 'attempting to exclude or include an invalid node must fail' '