Skip to content

Commit

Permalink
testsuite: fix potential rounding issue in expiration test
Browse files Browse the repository at this point in the history
Problem: t2900-job-timelimits.t has been seen to fail when flux-jobs
rounds the expiration of a job differently than is in the instance R.

Since we're not concerned with floatin-ping seconds for this particular
test, be sure to round/truncate the expiration values before comparison
by using the existing round() function.
  • Loading branch information
grondo committed Mar 29, 2022
1 parent 7ff9490 commit beed92e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion t/t2900-job-timelimits.t
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ test_expect_success HAVE_JQ 'job timelimits are propagated' '
id1=\$(flux mini submit --wait-event=start sleep 300)
flux jobs -no "{id.f58} {expiration}"
test "\$(flux jobs -no {expiration} \$id1)" = "\$expiration"
exp1=\$(flux jobs -no {expiration} \$id1)
test "\$(round \$exp1)" = "\$(round \${expiration})"
flux job cancelall -f
id2=\$(flux mini submit --wait-event=start -t 1m sleep 300)
Expand Down

0 comments on commit beed92e

Please sign in to comment.