File: test_rsc.py

package info (click to toggle)
boinc 7.4.23%2Bdfsg-1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 83,852 kB
  • sloc: cpp: 170,660; ansic: 58,078; php: 49,917; xml: 14,080; java: 13,585; python: 6,181; perl: 4,168; sh: 3,451; makefile: 2,096; sql: 1,192; objc: 572; csh: 126; pascal: 62; lisp: 47
file content (27 lines) | stat: -rwxr-xr-x 685 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python

## $Id$

# Test whether the scheduling server filters out work units too big for client

from test_uc import *

class WorkTooBig(WorkUC):
    def __init__(self):
        WorkUC.__init__(self)
        self.rsc_disk_bound = 1000000000000   # 1 TB

class ResultUnsent:
    def __init__(self):
        self.server_state = RESULT_SERVER_STATE_UNSENT

class ProjectRsc(ProjectUC):
    def __init__(self):
        ProjectUC.__init__(self, short_name='test_rsc', works=[WorkTooBig()])
    def check(self):
        self.check_results(ResultUnsent())

if __name__ == '__main__':
    test_msg("resource filtering for large work units")
    ProjectRsc()
    run_check_all()