2003-06-26 00:20:44 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
## $Id$
|
|
|
|
|
|
|
|
# Makes sure that the client aborts when the output file size limit is
|
|
|
|
# exceeded, and that the server knows it.
|
|
|
|
|
|
|
|
from test_uc import *
|
|
|
|
|
|
|
|
class WorkAbort(WorkUC):
|
|
|
|
def __init__(self):
|
|
|
|
WorkUC.__init__(self)
|
|
|
|
self.result_template = "abort_result"
|
|
|
|
|
2003-06-28 00:56:45 +00:00
|
|
|
class ResultAbort(ResultUCError):
|
2003-06-26 00:20:44 +00:00
|
|
|
def __init__(self):
|
2003-06-28 00:56:45 +00:00
|
|
|
ResultUCError.__init__(self)
|
2003-08-15 20:27:21 +00:00
|
|
|
self.stderr_out.append('<message>Output file exceeded size limit')
|
2003-06-26 00:20:44 +00:00
|
|
|
|
|
|
|
class ProjectAbort(ProjectUC):
|
|
|
|
def __init__(self):
|
2003-06-26 00:36:22 +00:00
|
|
|
ProjectUC.__init__(self, short_name='test_abort', works=[WorkAbort()])
|
2003-06-26 00:20:44 +00:00
|
|
|
def check(self):
|
2003-06-28 00:56:45 +00:00
|
|
|
self.check_client_error(ResultAbort())
|
2003-06-26 00:20:44 +00:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
test_msg("result abort mechanism (disk space limit)")
|
|
|
|
ProjectAbort()
|
|
|
|
run_check_all()
|