Skip to content

Commit

Permalink
wait longer in flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
Stuart Young committed Jul 29, 2019
1 parent ff99e02 commit 6be4494
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions codejail/tests/test_jail_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def test_hello_world(self):
self.assertEqual(res.stdout, 'Hello, world!\n')

def test_argv(self):
set_limit('REALTIME', 2)
res = jailpy(
code="import sys; print ':'.join(sys.argv[1:])",
argv=["Hello", "world", "-x"],
Expand Down Expand Up @@ -280,6 +281,7 @@ def test_cant_use_too_much_cpu(self):
def test_cant_use_too_much_time(self, log_log):
# Default time limit is 1 second. Sleep for 1.5 seconds.
set_limit('CPU', 100)
set_limit('REALTIME', 1)
res = jailpy(code="import time; time.sleep(1.5); print 'Done!'")
self.assertEqual(res.stdout, "")
self.assertEqual(res.status, -signal.SIGKILL) # -9
Expand Down

0 comments on commit 6be4494

Please sign in to comment.