-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testsuite: add test for sched hello failure
Problem: there is no test coverage for a failure of the sched hello callback. Add a test that ensures a job whose resources cannot be re-allocated receives a fatal exception.
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/sh | ||
|
||
test_description='test sched hello | ||
Ensure that a job that the scheduler rejects during hello processing | ||
receives a fatal exception. | ||
' | ||
|
||
# Append --logfile option if FLUX_TESTS_LOGFILE is set in environment: | ||
test -n "$FLUX_TESTS_LOGFILE" && set -- "$@" --logfile | ||
. $(dirname $0)/sharness.sh | ||
|
||
test_under_flux 1 job | ||
|
||
test_expect_success 'start a long-running job' ' | ||
jobid=$(flux mini submit -n1 -t1h sleep 3600) | ||
' | ||
test_expect_success 'unload scheduler' ' | ||
flux module remove sched-simple | ||
' | ||
test_expect_success 'exclude the job node from configuration' ' | ||
flux config load <<-EOT | ||
[resource] | ||
exclude = "0" | ||
EOT | ||
' | ||
test_expect_success 'increase broker stderr log level' ' | ||
flux setattr log-stderr-level 6 | ||
' | ||
test_expect_success 'load scheduler' ' | ||
flux module load sched-simple | ||
' | ||
test_expect_success 'job receives exception' ' | ||
flux job wait-event -t 30 ${jobid} exception | ||
' | ||
test_expect_success 'job receives clean event' ' | ||
flux job wait-event -v -t 30 ${jobid} clean | ||
' | ||
test_expect_success 'decrease broker stderr log level' ' | ||
flux setattr log-stderr-level 5 | ||
' | ||
|
||
test_done |