gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r20521 - gnunet/src/peerinfo-tool


From: gnunet
Subject: [GNUnet-SVN] r20521 - gnunet/src/peerinfo-tool
Date: Thu, 15 Mar 2012 13:46:12 +0100

Author: grothoff
Date: 2012-03-15 13:46:12 +0100 (Thu, 15 Mar 2012)
New Revision: 20521

Modified:
   gnunet/src/peerinfo-tool/gnunet-peerinfo.c
   gnunet/src/peerinfo-tool/test_gnunet_peerinfo.py.in
Log:
-fix testcase, reintroduce timeout

Modified: gnunet/src/peerinfo-tool/gnunet-peerinfo.c
===================================================================
--- gnunet/src/peerinfo-tool/gnunet-peerinfo.c  2012-03-15 12:45:08 UTC (rev 
20520)
+++ gnunet/src/peerinfo-tool/gnunet-peerinfo.c  2012-03-15 12:46:12 UTC (rev 
20521)
@@ -39,6 +39,11 @@
 #define HELLO_URI_PREFIX "gnunet://hello/"
 
 /**
+ * How long until we time out during peerinfo iterations?
+ */
+#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
+
+/**
  * Structure we use to collect printable address information.
  */
 struct PrintContext;
@@ -783,7 +788,7 @@
     get_info = GNUNET_NO;
     GPI_plugins_load (cfg);
     pic = GNUNET_PEERINFO_iterate (peerinfo, NULL,
-                                  GNUNET_TIME_UNIT_FOREVER_REL, 
+                                  TIMEOUT,
                                   &print_peer_info, NULL);
     return;
   }
@@ -812,7 +817,7 @@
     GNUNET_free (pkey);
     GPI_plugins_load (cfg);
     pic = GNUNET_PEERINFO_iterate (peerinfo, &my_peer_identity,
-                                  GNUNET_TIME_UNIT_FOREVER_REL,
+                                  TIMEOUT,
                                   &print_my_uri, guc);
     get_uri = GNUNET_NO;
     return;

Modified: gnunet/src/peerinfo-tool/test_gnunet_peerinfo.py.in
===================================================================
--- gnunet/src/peerinfo-tool/test_gnunet_peerinfo.py.in 2012-03-15 12:45:08 UTC 
(rev 20520)
+++ gnunet/src/peerinfo-tool/test_gnunet_peerinfo.py.in 2012-03-15 12:46:12 UTC 
(rev 20521)
@@ -42,8 +42,8 @@
 
 
 pinfo = pexpect ()
-pinfo.spawn (None, [peerinfo, '-c', 'test_gnunet_peerinfo_data.conf', '-L', 
'ERROR'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-pinfo.expect ("stdout", re.compile (r'Error in communication with PEERINFO 
service\r?\n'))
+pinfo.spawn (None, [peerinfo, '-i', '-c', 'test_gnunet_peerinfo_data.conf', 
'-L', 'ERROR'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+pinfo.expect ("stdout", re.compile (r'Error in communication with PEERINFO 
service: Failed to transmit iteration request to `PEERINFO\' service\r?\n'))
 pinfo.expect ("stdout", "EOF")
 
 if os.name == "nt":
@@ -67,13 +67,13 @@
   arm.communicate ()
   time.sleep (1)
 
-  pinfo.spawn (None, [peerinfo, '-c', 'test_gnunet_peerinfo_data.conf'], 
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+  pinfo.spawn (None, [peerinfo, '-i', '-c', 'test_gnunet_peerinfo_data.conf'], 
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
   pinfo.expect ("stdout", re.compile ("Peer `.*'\r?\n"))
   m = pinfo.expect ("stdout", re.compile ("\s.*:24357\r?\n"))
   while len (m.group (0)) > 0:
     m = pinfo.expect ("stdout", re.compile ("(\s.*:24357\r?\n|\r?\n|)"))
 
-  pinfo.spawn (None, [peerinfo, '-c', 'test_gnunet_peerinfo_data.conf', '-n'], 
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+  pinfo.spawn (None, [peerinfo, '-i', '-c', 'test_gnunet_peerinfo_data.conf', 
'-n'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
   pinfo.expect ("stdout", re.compile ("Peer `.*'\r?\n"))
   m = pinfo.expect ("stdout", re.compile ("\s.*:24357\r?\n"))
   while len (m.group (0)) > 0:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]