From 6b1df64fde1dfd9503eaa1e96eaf10d40c34b835 Mon Sep 17 00:00:00 2001
From: Danny Auble <da@schedmd.com>
Date: Mon, 28 Oct 2013 17:06:17 -0700
Subject: [PATCH] more refinement to test

---
 testsuite/expect/inc21.30.1 | 10 +++++-----
 testsuite/expect/inc21.30.5 |  9 +++------
 testsuite/expect/inc21.30.6 |  5 +++--
 testsuite/expect/test21.30  | 18 ++++++++++--------
 4 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/testsuite/expect/inc21.30.1 b/testsuite/expect/inc21.30.1
index 923450dca48..0fc68af994d 100644
--- a/testsuite/expect/inc21.30.1
+++ b/testsuite/expect/inc21.30.1
@@ -57,14 +57,14 @@ proc inc21_30_1 {} {
 
 	spawn $salloc -N1 --account=$acct --exclusive $srun $bin_sleep 10
 	expect {
-		-re "Granted job allocation ($number)" {
-			set job_id2 $expect_out(1,string)
-			send_user "\njob $job_id2 has been submitted\n"
-		}
-		-re "job ($number)" {
+		-re "job ($number) queued and waiting for resources" {
 			set job_id2 $expect_out(1,string)
 			send_user "\nJob $job_id2 is waiting for resources. This is expected.\n"
 		}
+		-re "Granted job allocation ($number)" {
+			send_user "\nFAILURE: This should have pended but did not\n"
+			set exit_code 1
+		}
 		timeout {
 			send_user "\nFAILURE: salloc is not reponding\n"
 			set exit_code 1
diff --git a/testsuite/expect/inc21.30.5 b/testsuite/expect/inc21.30.5
index 7dcf189b523..8898e4e1765 100644
--- a/testsuite/expect/inc21.30.5
+++ b/testsuite/expect/inc21.30.5
@@ -38,12 +38,9 @@ proc inc21_30_5 {} {
 
 	spawn $salloc --account=$acct -n$maxcpu_num $srun $bin_sleep 2
 	expect {
-		-re "job ($number)" {
-			set job_id1 $expect_out(1,string)
-			send_user "\nThis is expected do not worry\n"
-
-		}
 		-re "Granted job allocation ($number)" {
+			set job_id1 $expect_out(1,string)
+			send_user "\njob $job_id1 has been submitted\n"
 		}
 		timeout {
 			send_user "\nFAILURE: salloc not responding\n"
@@ -61,7 +58,7 @@ proc inc21_30_5 {} {
 	expect {
 		-re "Pending job allocation ($number)" {
 			set job_id1 $expect_out(1,string)
-			send_user "\nThis is expected do not worry\n"
+			send_user "\nJob $job_id1 is waiting for resources. This is expected.\n"
 		}
 		-re "Granted job allocation ($number)" {
 			send_user "\nFAILURE: This should have pended but did not\n"
diff --git a/testsuite/expect/inc21.30.6 b/testsuite/expect/inc21.30.6
index d5e3793b285..d5415643e58 100644
--- a/testsuite/expect/inc21.30.6
+++ b/testsuite/expect/inc21.30.6
@@ -40,6 +40,7 @@ proc inc21_30_6 {} {
 	expect {
 		-re "Granted job allocation ($number)" {
 			set job_id1 $expect_out(1,string)
+			send_user "\njob $job_id1 has been submitted\n"
 		}
 		-re "Pending job allocation ($number)" {
 			set job_id1 $expect_out(1,string)
@@ -60,9 +61,9 @@ proc inc21_30_6 {} {
 
 	spawn $salloc --account=$acct -N[expr $maxnode_num + 1] --exclusive -t1 $srun $bin_sleep 2
 	expect {
-		-re "Pending job allocation ($number)" {
+		-re "job ($number) queued and waiting for resources" {
 			set job_id1 $expect_out(1,string)
-			send_user "\nThis is expected do not worry\n"
+			send_user "\nJob $job_id1 is waiting for resources. This is expected.\n"
 		}
 		-re "Granted job allocation ($number)" {
 			send_user "\nFAILURE: This should have pended but did not\n"
diff --git a/testsuite/expect/test21.30 b/testsuite/expect/test21.30
index 6c23b3c8cc1..140f3400178 100755
--- a/testsuite/expect/test21.30
+++ b/testsuite/expect/test21.30
@@ -157,6 +157,8 @@ proc endit { } {
 
 	if {$exit_code == 0} {
 		print_success $test_id
+	} else {
+		send_user "\nFAILURE: test $test_id\n"
 	}
 
 	exit $exit_code
@@ -247,7 +249,7 @@ expect {
 
 mod_qos $grn_num -1 -1 -1 -1 -1 -1 -1
 
-sleep 5
+sleep 1
 #test GrpNode limit
 inc21_30_1
 if {$exit_code != 0} {
@@ -256,7 +258,7 @@ if {$exit_code != 0} {
 
 mod_qos -1 $grcpu_num -1 -1 -1 -1 -1 -1
 
-sleep 5
+sleep 1
 #test GrpCpus
 inc21_30_2
 if {$exit_code != 0} {
@@ -265,7 +267,7 @@ if {$exit_code != 0} {
 
 mod_qos -1 -1 $grjobs_num -1 -1 -1 -1 -1
 
-sleep 5
+sleep 1
 # test GrpJob limits
 inc21_30_3
 if {$exit_code != 0} {
@@ -275,7 +277,7 @@ if {$exit_code != 0} {
 
 mod_qos -1 -1 -1 $grsub_num -1 -1 -1 -1
 
-sleep 5
+sleep 1
 # test GrpSubmit
 inc21_30_4
 if {$exit_code != 0} {
@@ -285,7 +287,7 @@ if {$exit_code != 0} {
 
 mod_qos -1 -1 -1 -1 $maxcpu_num -1 -1 -1
 
-sleep 5
+sleep 1
 #test MaxCpus limits
 inc21_30_5
 if {$exit_code != 0} {
@@ -294,7 +296,7 @@ if {$exit_code != 0} {
 
 mod_qos -1 -1 -1 -1 -1 $maxnode_num -1 -1
 
-sleep 5
+sleep 1
 #test MaxNode limit
 inc21_30_6
 if {$exit_code != 0} {
@@ -303,7 +305,7 @@ if {$exit_code != 0} {
 
 mod_qos -1 -1 -1 -1 -1 -1 $maxjobs_num -1
 
-sleep 5
+sleep 1
 #test MaxJobs limit
 inc21_30_7
 if {$exit_code != 0} {
@@ -312,7 +314,7 @@ if {$exit_code != 0} {
 
 mod_qos -1 -1 -1 -1 -1 -1 -1 $maxjobsub_num
 
-sleep 5
+sleep 1
 #test MaxJobsSubmits limit
 inc21_30_8
 if {$exit_code != 0} {
-- 
GitLab