aboutsummaryrefslogtreecommitdiff
path: root/src/integration-tests/test_integration_bootstrap_and_connect.py.in
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-12-15 17:03:59 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-12-15 17:03:59 +0000
commitac01064f2f336b9903164e11450bb46d4c5c04ad (patch)
tree944056458bea3529042287fdec40a65f78802824 /src/integration-tests/test_integration_bootstrap_and_connect.py.in
parent9af43c04be4bb3df805b07e42e04e4a5e70453d8 (diff)
downloadgnunet-ac01064f2f336b9903164e11450bb46d4c5c04ad.tar.gz
gnunet-ac01064f2f336b9903164e11450bb46d4c5c04ad.zip
improved tests
Diffstat (limited to 'src/integration-tests/test_integration_bootstrap_and_connect.py.in')
-rwxr-xr-xsrc/integration-tests/test_integration_bootstrap_and_connect.py.in15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/integration-tests/test_integration_bootstrap_and_connect.py.in b/src/integration-tests/test_integration_bootstrap_and_connect.py.in
index 38746544c..581179f99 100755
--- a/src/integration-tests/test_integration_bootstrap_and_connect.py.in
+++ b/src/integration-tests/test_integration_bootstrap_and_connect.py.in
@@ -42,8 +42,7 @@ from gnunet_testing import *
42#definitions 42#definitions
43 43
44testname = "test_integration_bootstrap_and_connect" 44testname = "test_integration_bootstrap_and_connect"
45verbose = True 45verbose = False
46success = False
47timeout = 100 46timeout = 100
48 47
49 48
@@ -55,16 +54,18 @@ def cleanup ():
55 shutil.rmtree ("/tmp/c_bootstrap_server/", True) 54 shutil.rmtree ("/tmp/c_bootstrap_server/", True)
56 shutil.rmtree ("/tmp/c_no_nat_client/", True) 55 shutil.rmtree ("/tmp/c_no_nat_client/", True)
57 56
58def success (): 57def success_cont (check):
59 global success 58 global success
60 success = True; 59 success = True;
61def fail (): 60
61def fail_cont (check):
62 global success 62 global success
63 success= False; 63 success= False;
64 check.eval(True)
64 65
65def check (): 66def check ():
66 67
67 check = Check () 68 check = Check (test)
68 check.add (StatisticsCondition (client, 'transport', '# peers connected',1)) 69 check.add (StatisticsCondition (client, 'transport', '# peers connected',1))
69 check.add (StatisticsCondition (client, 'core', '# neighbour entries allocated',1)) 70 check.add (StatisticsCondition (client, 'core', '# neighbour entries allocated',1))
70 check.add (StatisticsCondition (client, 'core', '# entries in session map',1)) 71 check.add (StatisticsCondition (client, 'core', '# entries in session map',1))
@@ -78,11 +79,12 @@ def check ():
78 check.add (StatisticsCondition (server, 'topology', '# peers connected',1)) 79 check.add (StatisticsCondition (server, 'topology', '# peers connected',1))
79 check.add (StatisticsCondition (server, 'fs', '# peers connected',1)) 80 check.add (StatisticsCondition (server, 'fs', '# peers connected',1))
80 81
81 check.run_blocking (10, success, fail) 82 check.run_blocking (10, success_cont, fail_cont)
82 83
83# 84#
84# Test execution 85# Test execution
85# 86#
87success = False
86 88
87test = Test ('test_integration_bootstrap_and_connect.py', verbose) 89test = Test ('test_integration_bootstrap_and_connect.py', verbose)
88 90
@@ -93,6 +95,7 @@ client = Peer(test, './confs/c_no_nat_client.conf');
93client.start(); 95client.start();
94 96
95if ((client.started == True) and (server.started == True)): 97if ((client.started == True) and (server.started == True)):
98 test.p ('Peers started, running check')
96 check () 99 check ()
97 100
98server.stop () 101server.stop ()