Exemplo n.º 1
0
def test():
    stdout, stderr, err = th.make_standalone(args=['elastic=true', 'initialActivePorts=1'])
    th.assert_pass(err == 0, stdout, stderr)

    stdout, stderr, err = th.run_standalone(args=['tuples=300000000'])
    th.assert_pass(err == 0 and 
                   stdout.rstrip() == 'pass', 
                   stdout, stderr)

    stdout, stderr, err = th.make_standalone(args=['elastic=true', 'initialActivePorts=3'])
    th.assert_pass(err == 0, stdout, stderr)

    stdout, stderr, err = th.run_standalone(args=['tuples=300000000'])
    th.assert_pass(err == 0 and 
                   stdout.rstrip() == 'pass', 
                   stdout, stderr)

    stdout, stderr, err = th.make_standalone(args=['elastic=false', 'initialActivePorts=1'])
    th.assert_pass(err == 0, stdout, stderr)

    stdout, stderr, err = th.run_standalone(args=['tuples=10000000'])
    th.assert_pass(err == 0 and 
                   stdout.rstrip() == 'pass', 
                   stdout, stderr)

    stdout, stderr, err = th.make_standalone(args=['elastic=false', 'initialActivePorts=4'])
    th.assert_pass(err == 0, stdout, stderr)

    stdout, stderr, err = th.run_standalone(args=['tuples=10000000'])
    th.assert_pass(err == 0 and 
                   stdout.rstrip() == 'pass', 
                   stdout, stderr)
Exemplo n.º 2
0
def test():
    stdout, stderr, err = th.make_standalone()
    th.assert_pass(
        err != 0 and stderr.find(
            'ERROR: The initialActivePorts param must not be greater than the number of output ports.'
        ) != -1, stdout, stderr)
Exemplo n.º 3
0
def test():
    stdout, stderr, err = th.make_standalone()
    th.assert_pass(err != 0 and 
                   stderr.find('ERROR: The initialActivePorts param must not be greater than the number of output ports.') != -1,
                   stdout, stderr)
Exemplo n.º 4
0
def test():
    stdout, stderr, err = th.make_standalone()
    th.assert_pass(
        err != 0 and stderr.find(
            'ERROR: The throughputTolerance param must be a value between 0.0 and 1.0.'
        ) != -1, stdout, stderr)
Exemplo n.º 5
0
def test():
    stdout, stderr, err = th.make_standalone()
    th.assert_pass(
        err != 0 and
        stderr.find('ERROR: The measurePeriod param must be greater than 0.')
        != -1, stdout, stderr)
Exemplo n.º 6
0
def test():
    stdout, stderr, err = th.make_standalone()
    th.assert_pass(err != 0 and 
                   stderr.find('ERROR: The measurePeriod param must be greater than 0.') != -1,
                   stdout, stderr)
Exemplo n.º 7
0
def test():
    stdout, stderr, err = th.make_standalone()
    th.assert_pass(err != 0 and 
                   stderr.find('ERROR: The throughputTolerance param must be a value between 0.0 and 1.0.') != -1,
                   stdout, stderr)