Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loosen test criteria for realtime tests to accomodate time uncertainty #1133

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions tests/testsuite_default_RealTime.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def test_RealTime_SIGUSR2(self):
num_lines = 101 + (threads * ranks) * 5
self.assertTrue(sig_found, "Output file is missing SIGUSR2 triggered output message")
self.assertTrue(exit_count >= num_para, "Exit message count incorrect, should be at least {0}, found {1} in {2}".format(exit_count,num_para,outfile))
self.assertTrue(line_count == num_lines, "Line count incorrect, should be {0}, found {1} in {2}".format(num_lines,line_count,outfile))
self.assertTrue(line_count >= num_lines, "Line count incorrect, should be at least {0}, found {1} in {2}".format(num_lines,line_count,outfile))

@unittest.skipIf(testing_check_get_num_ranks() > 1, "This test does not run reliably with mpirun")
def test_RealTime_SIGINT(self):
Expand Down Expand Up @@ -172,7 +172,7 @@ def test_RealTime_SIGALRM(self):
self.run_sst(sdlfile, outfile, other_args="--exit-after=6s --heartbeat-wall-period=1")

# Cannot diff test output because times may differ
# Check for 6 heartbeat messages
# Check for at least 5 heartbeat messages
# Check for ended due to exit-after
# Check for right number of lines in output
hb_count = 0
Expand All @@ -189,9 +189,10 @@ def test_RealTime_SIGALRM(self):
ranks = testing_check_get_num_ranks()
threads = testing_check_get_num_threads()
num_para = threads * ranks
num_lines = 131 + 2*num_para # basic heartbeat (30) + exit messages (1 + 2*para) + Component Finished messages (100)
num_lines = 126 + 2*num_para # basic heartbeat (>25) + exit messages (1 + 2*para) + Component Finished messages (100)
if ranks > 1:
num_lines += 12 # Extra heartbeat output for MPI
self.assertTrue(hb_count == 6, "Heartbeat count incorrect, should be 6, found {0} in {1}".format(hb_count,outfile))
self.assertTrue(hb_count >= 5, "Heartbeat count incorrect, should be at least 5, found {0} in {1}".format(hb_count,outfile))
self.assertTrue(exit_count == num_para, "Exit message count incorrect, should be {0}, found {1} in {2}".format(num_para,exit_count,outfile))
self.assertTrue(line_count == num_lines, "Line count incorrect, should be {0}, found {1} in {2}".format(num_lines,line_count,outfile))
self.assertTrue(line_count >= num_lines, "Line count incorrect, should be {0}, found {1} in {2}".format(num_lines,line_count,outfile))

Loading