Permalink
Browse files

system tests: fix arity of methods.

  • Loading branch information...
1 parent 36b0b00 commit 63ac0acef4c6853f7da4b752ce9cb9a2a7abbaf0 Romain Slootmaekers committed Mar 1, 2013
View
8 pylabs/test/server/left/system_tests_long_left.py
@@ -110,14 +110,14 @@ def do_one(n, max_wait):
X.logging.info("status=%s", stat)
C.assert_running_nodes(2)
X.logging.info("going to do %i sets", n)
- C.iterate_n_times(n, C.simple_set)
+ C.iterate_n_times(n, C.simple_set, protocol_version = 2)
C.stop_all()
X.logging.info("stopped all nodes")
C.whipe(nn)
X.logging.info("whiped %s", nn)
C.start_all()
X.logging.info("started all nodes")
- cli = C.get_client ()
+ cli = C.get_client(protocol_version = 2)
counter = 0
up2date = False
@@ -140,7 +140,7 @@ def do_one(n, max_wait):
@C.with_custom_setup(C.setup_2_nodes_forced_master, C.basic_teardown)
def test_catchup_only():
- C.iterate_n_times(123000,C.simple_set)
+ C.iterate_n_times(123000,C.simple_set, protocol_version = 2)
n0 = CONFIG.node_names[0]
n1 = CONFIG.node_names[1]
C.stopOne(n1)
@@ -153,7 +153,7 @@ def test_catchup_only():
@C.with_custom_setup(C.setup_3_nodes, C.basic_teardown)
def test_sequence_catchup():
- cli = C.get_client()
+ cli = C.get_client(protocol_version = 2)
seq = arakoon.ArakoonProtocol.Sequence()
seq.addSet("k","v")
seq.addDelete("k")
View
16 pylabs/test/server/left/test_torture.py
@@ -31,32 +31,32 @@ def last_slave(master_id):
@C.with_custom_setup(C.setup_3_nodes, C.basic_teardown)
def test_shaky_slave():
- cli = C.get_client()
+ cli = C.get_client(protocol_version = 2)
master_id = cli.whoMaster()
slave_id = last_slave(master_id)
C.stopOne(slave_id)
print ("slave %s stopped" % slave_id)
n = 2000
- C.iterate_n_times( n, C.simple_set)
+ C.iterate_n_times( n, C.simple_set, protocol_version = 2)
cycles = 100
for i in range(cycles):
print ("starting cycle %i" % i)
C.startOne(slave_id)
- C.iterate_n_times( n, C.simple_set)
+ C.iterate_n_times( n, C.simple_set, protocol_version = 2)
C.stopOne(slave_id)
- C.iterate_n_times( n, C.simple_set)
+ C.iterate_n_times( n, C.simple_set, protocol_version = 2)
print "phewy!"
@C.with_custom_setup(C.setup_3_nodes, C.basic_teardown)
def test_fat_shaky_slave():
- cli = C.get_client()
+ cli = C.get_client(protocol_version = 2)
master_id = cli.whoMaster()
slave_id = last_slave(master_id)
C.stopOne(slave_id)
X.logging.debug("slave %s stopped",slave_id)
n = 20000
X.logging.debug("doing %i sets", n)
- C.iterate_n_times( n, C.simple_set)
+ C.iterate_n_times( n, C.simple_set, protocol_version = 2)
X.logging.debug("done with sets")
cycles = 10
cluster = C._getCluster()
@@ -67,12 +67,12 @@ def test_fat_shaky_slave():
C.startOne(slave_id)
X.logging.debug("started slave %s", slave_id)
X.logging.debug("doing %i sets" , n)
- C.iterate_n_times( n, C.simple_set)
+ C.iterate_n_times( n, C.simple_set, protocol_version = 2)
X.logging.debug("done with sets")
X.logging.debug("stopping %s",slave_id)
C.stopOne(slave_id)
X.logging.debug("another %i sets",n)
- C.iterate_n_times( n, C.simple_set)
+ C.iterate_n_times( n, C.simple_set, protocol_version = 2)
print "phewy!"
@C.with_custom_setup(C.setup_3_nodes, C.basic_teardown)
View
24 pylabs/test/server/right/system_tests_long_right.py
@@ -33,7 +33,7 @@
@C.with_custom_setup( C.default_setup, C.basic_teardown )
def test_single_client_100000_sets():
- C.iterate_n_times( 100000, C.simple_set )
+ C.iterate_n_times( 100000, C.simple_set, protocol_version = 2 )
@C.with_custom_setup( C.setup_3_nodes_forced_master, C.basic_teardown )
def test_delete_non_existing_with_catchup ():
@@ -125,13 +125,17 @@ def test_restart_master_long ():
restart_iter_cnt = 10
def write_loop ():
C.iterate_n_times( 100000,
- C.retrying_set_get_and_delete,
- failure_max=2*restart_iter_cnt,
- valid_exceptions=[ArakoonSockNotReadable,ArakoonNotFound] )
+ C.retrying_set_get_and_delete,
+ failure_max=2*restart_iter_cnt,
+ valid_exceptions=[ArakoonSockNotReadable,ArakoonNotFound],
+ protocol_version = 2
+ )
def restart_loop ():
C.delayed_master_restart_loop( restart_iter_cnt ,
- 1.5 * C.CONFIG.lease_duration )
+ 1.5 * C.CONFIG.lease_duration,
+ protocol_version = 2
+ )
global test_failed
test_failed = False
C.create_and_wait_for_thread_list( [restart_loop, write_loop] )
@@ -322,18 +326,22 @@ def test_sso_deployment():
def write_loop ():
C.iterate_n_times( 10000,
- C.retrying_set_get_and_delete )
+ C.retrying_set_get_and_delete, protocol_version = 2)
def large_write_loop ():
C.iterate_n_times( 280000,
C.retrying_set_get_and_delete,
- startSuffix = 1000000 )
+ startSuffix = 1000000,
+ protocol_version = 2
+ )
write_thr1 = C.create_and_start_thread ( write_loop )
def non_retrying_write_loop ():
C.iterate_n_times( 10000,
C.set_get_and_delete,
- startSuffix = 2000000 )
+ startSuffix = 2000000,
+ protocol_version = 2
+ )
C.add_node( 1 )
cl = C._getCluster()
View
4 pylabs/test/server/system_tests_common.py
@@ -759,7 +759,7 @@ def create_and_wait_for_threads ( thr_cnt, iter_cnt, f, timeout=None ):
f_list = []
for i in range( thr_cnt ) :
- g = lambda : iterate_n_times(iter_cnt, f )
+ g = lambda : iterate_n_times(iter_cnt, f, protocol_version = 2 )
f_list.append( g )
create_and_wait_for_thread_list( f_list, timeout)
@@ -823,7 +823,7 @@ def generic_retrying_set_get_and_delete( client, key, value, is_valid_ex):
# (or the next iteration we are back to using the old one)
client.recreate = True
client.dropConnections()
- client = get_client()
+ client = get_client( protocol_version = 2)
except Exception, ex:
X.logging.debug( "Caught an exception => %s: %s", ex.__class__.__name__, ex )

0 comments on commit 63ac0ac

Please sign in to comment.