-indentation, code cleanup
[oweals/gnunet.git] / src / integration-tests / test_integration_connection_values_tcp.py.in
index 6c0072a3e6b82ad3186c6f08275cac6ccc36319b..efcf5c7fdd9596c5beb834c21c735056d266df62 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!@PYTHON@
 #    This file is part of GNUnet.
 #    (C) 2010 Christian Grothoff (and other contributing authors)
 #
@@ -30,26 +30,26 @@ import subprocess
 import re
 import shutil
 import time
-import pexpect
 from gnunet_testing import Peer
 from gnunet_testing import Test
 from gnunet_testing import Check
 from gnunet_testing import Condition
 from gnunet_testing import * 
  
+if os.name == "nt":
+  tmp = os.getenv ("TEMP")
+else:
+  tmp = "/tmp"
 
 #definitions
 
 testname = "test_integration_connection_value"
 verbose = True
-check_timeout = 30
+check_timeout = 180
 
 
 def cleanup ():
-       if os.name == "nt":
-           shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_normal_client"), True)
-       else:
-           shutil.rmtree ("/tmp/c_normal_client/", True)
+    shutil.rmtree (os.path.join (tmp, "c_normal_client"), True)
 
 
 def success_cont (check):
@@ -65,10 +65,10 @@ def fail_cont (check):
 def check_connect ():
   check = Check (test)
   check.add (EqualStatisticsCondition (client, 'transport', '# peers connected', client,  'core', '# neighbour entries allocated'))
-  check.add (EqualStatisticsCondition (client, 'transport', '# peers connected', client,  'core', '# entries in session map'))
-  check.add (EqualStatisticsCondition (client, 'core', '# neighbour entries allocated', client,  'core', '# entries in session map'))
+  check.add (EqualStatisticsCondition (client, 'transport', '# peers connected', client,  'core', '# peers connected'))
+  check.add (EqualStatisticsCondition (client, 'core', '# neighbour entries allocated', client,  'core', '# peers connected'))
   check.add (EqualStatisticsCondition (client, 'transport', '# peers connected', client, 'topology', '# peers connected'))
-  check.add (EqualStatisticsCondition (client, 'topology', '# peers connected', client, 'core', '# entries in session map'))
+  check.add (EqualStatisticsCondition (client, 'topology', '# peers connected', client, 'core', '# peers connected'))
   
   while True:
        check.reset()