summaryrefslogtreecommitdiff
path: root/src/integration-tests
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-04-03 13:22:45 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-04-03 13:22:45 +0000
commit76eeabb0a763523d4e13be65c74165988707241e (patch)
tree45fbe6bd2f35dd83bcb32f5ecb0663cad423b556 /src/integration-tests
parent766391abef01aa3106c9abc447a07588cc4cae93 (diff)
- changes
Diffstat (limited to 'src/integration-tests')
-rw-r--r--src/integration-tests/gnunet_testing.py.in7
-rwxr-xr-xsrc/integration-tests/test_integration_connection_value.py.in18
2 files changed, 15 insertions, 10 deletions
diff --git a/src/integration-tests/gnunet_testing.py.in b/src/integration-tests/gnunet_testing.py.in
index fa8af728c..253797249 100644
--- a/src/integration-tests/gnunet_testing.py.in
+++ b/src/integration-tests/gnunet_testing.py.in
@@ -42,7 +42,6 @@ class Check:
neg += 1
else:
pos += 1
- self.test.p (str(pos) +' out of '+ str (pos+neg) + ' conditions fulfilled')
return fulfilled
def run_blocking (self, timeout, pos_cont, neg_cont):
execs = 0;
@@ -75,6 +74,10 @@ class Check:
pos += 1
print (str(pos) +' out of '+ str (pos+neg) + ' conditions fulfilled')
return self.fulfilled
+ def reset (self):
+ self.fulfilled = False
+ for c in self.conditions:
+ c.fulfilled = False
class Condition:
def __init__(self):
@@ -125,7 +128,7 @@ class StatisticsCondition (Condition):
self.result = -1;
def check(self):
if (self.fulfilled == False):
- self.result = self.peer.get_statistics_value (self.subsystem, self.name);
+ self.result = self.peer.get_statistics_value (self.subsystem, self.name)
if (str(self.result) == str(self.value)):
self.fulfilled = True
return True
diff --git a/src/integration-tests/test_integration_connection_value.py.in b/src/integration-tests/test_integration_connection_value.py.in
index cb9a1378e..29b1dfaa5 100755
--- a/src/integration-tests/test_integration_connection_value.py.in
+++ b/src/integration-tests/test_integration_connection_value.py.in
@@ -65,16 +65,18 @@ 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', '# entries in session map'))
+ check.add (EqualStatisticsCondition (client, 'core', '# neighbour entries allocated', client, 'core', '# entries in session map'))
while True:
- res = check.run_once (None, None)
- print "Values are equal"
- check.evaluate (False)
- if (False == res):
- break
- time.sleep (1)
+ time.sleep (5)
+ check.reset()
+ res = check.run_once (None, None)
+ print "Values are equal"
+ check.evaluate (False)
+#if (False == res):
+# break
+
#
# Test execution