Skip to content

Commit

Permalink
test/unreservable: add test for blocked jobs overmatching
Browse files Browse the repository at this point in the history
problem: we didn't have a test to reproduce the issue with blocked jobs
being constantly reconsidered

solution: with the new failed stats support, after the fix there should
be no more than 10 failures to match, 14 is somewhat deterministic for
this test if the issue comes back.
  • Loading branch information
trws committed May 3, 2024
1 parent 602c783 commit b4c8be7
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion t/t4013-unreservable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,42 @@ test_expect_success 'create 3 jobs with the same constraint, so two are unreserv
--progress --jps \
--flags=waitable \
--setattr=exec.test.run_duration=0.01s \
sleep 0.25
sleep 0.5
'

test_expect_success 'ensure all three succeeded' '
flux job wait -av
'
test_expect_success 'drain a few nodes' '
flux resource drain 1-5 test with drained nodes
'
test_expect_success 'create a set of 2 inactive jobs' '
flux submit --cc=1-2 --quiet \
-N 1 --exclusive \
--flags=waitable \
--requires="host:fake[4]" \
--progress --jps \
--setattr=exec.test.run_duration=0.01s \
hostname
'
test_expect_success 'create a set of 2 running jobs' '
time flux submit --progress --jps --quiet --cc=1-2 --wait-event=start -N1 \
--flags=waitable \
--requires=compute \
--setattr=exec.test.run_duration=0.01s \
hostname
'
test_expect_success 'undrain nodes' '
flux resource undrain 1-5
'
test_expect_success 'ensure all four succeeded' '
flux job wait -av
'
test_expect_success 'failed match requests should be 10, but 14 is bad' '
NJOBS_FAILED="$(rpc sched-fluxion-resource.stats-get | jq ".match.failed.njobs")" &&
echo njobs failed $NJOBS_FAILED &&
test $NJOBS_FAILED = 10
'
test_expect_success 'unload fluxion' '
flux module remove sched-fluxion-qmanager &&
flux module remove sched-fluxion-resource &&
Expand Down

0 comments on commit b4c8be7

Please sign in to comment.