From beed92e7c2cce1cade67ba3f894dcf1b7030c3bf Mon Sep 17 00:00:00 2001 From: "Mark A. Grondona" Date: Tue, 29 Mar 2022 14:55:05 -0700 Subject: [PATCH] testsuite: fix potential rounding issue in expiration test 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. --- t/t2900-job-timelimits.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/t2900-job-timelimits.t b/t/t2900-job-timelimits.t index 15acde3d2660..fdf6d0d9e8e0 100755 --- a/t/t2900-job-timelimits.t +++ b/t/t2900-job-timelimits.t @@ -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)