api changes
[oweals/gnunet.git] / src / integration-tests / test_integration_disconnect.py.in
index f708aee1da54ce963050f8a67524b54ee353e82b..5e137cfff294787fa0657930350bdc6b8001781a 100755 (executable)
@@ -49,7 +49,7 @@ check_timeout = 30
 
 def cleanup ():
        if os.name == "nt":
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "gnunet-test-fs-py-ns"), True)
+           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_bootstrap_server"), True)
            shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_no_nat_client"), True)
        else:
            shutil.rmtree ("/tmp/c_bootstrap_server/", True)
@@ -64,7 +64,7 @@ def success_disconnect_cont (check):
 def fail_disconnect_cont (check):    
     global success 
     success = False;
-    check.eval(True)   
+    check.evaluate(True)   
   
 
 def check_disconnect ():
@@ -86,7 +86,7 @@ def success_connect_cont (check):
 def fail_connect_cont (check):    
     global success 
     success= False;
-    check.eval(True)
+    check.evaluate(True)
 
 
 def check_connect ():
@@ -103,20 +103,17 @@ def check_connect ():
   check.add (StatisticsCondition (server, 'topology', '# peers connected',1))
   check.add (StatisticsCondition (server, 'fs', '# peers connected',1))  
   
-  check.run_blocking (10, success_connect_cont, fail_connect_cont)
+  check.run_blocking (check_timeout, success_connect_cont, fail_connect_cont)
 
 # 
 # Test execution
 # 
 
-# 
-# Test execution
-# 
 def run ():
+       global success
        global test
        global server
        global client
-       global success
        
        success = False
        
@@ -152,5 +149,8 @@ except (KeyboardInterrupt, SystemExit):
     server.stop ()
     client.stop ()
     cleanup ()
-sys.exit(success)      
+if (success == False):
+       sys.exit(1)   
+else:
+       sys.exit(0)    
        
\ No newline at end of file