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

Make time quota test easier to run locally #4313

Merged
merged 4 commits into from
Dec 1, 2022
Merged
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
5 changes: 3 additions & 2 deletions tests/cli/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1722,9 +1722,10 @@ def test_search_time(ctx):
@TestModule.register('run')
def test_run(ctx):
# Test that bundle fails when run without sufficient time quota
_run_command([cl, 'uedit', 'codalab', '--time-quota', '2'])
time_used = int(_run_command([cl, 'uinfo', 'codalab', '-f', 'time_used']))
_run_command([cl, 'uedit', 'codalab', '--time-quota', str(time_used + 2)])
uuid = _run_command([cl, 'run', 'sleep 100000'])
wait_until_state(uuid, State.KILLED, timeout_seconds=60)
wait_until_state(uuid, State.KILLED, timeout_seconds=120)
check_equals(
'Kill requested: User time quota exceeded. To apply for more quota,'
' please visit the following link: '
Expand Down