projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
binding to specific address
[oweals/gnunet.git]
/
src
/
transport
/
test_transport_api_reliability.c
diff --git
a/src/transport/test_transport_api_reliability.c
b/src/transport/test_transport_api_reliability.c
index f0c9d9db8f02683bfa45bc4f6cc45b937df559fd..18971a986218950e7dc1984edec24c767c73134f 100644
(file)
--- a/
src/transport/test_transport_api_reliability.c
+++ b/
src/transport/test_transport_api_reliability.c
@@
-38,16
+38,22
@@
#include "transport.h"
#include "transport-testing.h"
#include "transport.h"
#include "transport-testing.h"
-#define VERBOSE GNUNET_
YES
+#define VERBOSE GNUNET_
NO
#define VERBOSE_ARM GNUNET_NO
#define START_ARM GNUNET_YES
#define VERBOSE_ARM GNUNET_NO
#define START_ARM GNUNET_YES
+/**
+ * Testcase timeout
+ */
+#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
+
/**
* How long until we give up on transmitting the message?
*/
/**
* How long until we give up on transmitting the message?
*/
-#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1500)
+#define TIMEOUT_TRANSMIT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10)
+
static char *test_source;
static char *test_source;
@@
-251,13
+257,18
@@
notify_ready (void *cls, size_t size, void *buf)
unsigned int s;
unsigned int ret;
unsigned int s;
unsigned int ret;
+ th = NULL;
if (buf == NULL)
{
if (buf == NULL)
{
- GNUNET_break (0);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Timeout occurred while waiting for transmit_ready\n");
+ if (GNUNET_SCHEDULER_NO_TASK != die_task)
+ GNUNET_SCHEDULER_cancel (die_task);
+ die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL);
ok = 42;
return 0;
}
ok = 42;
return 0;
}
- th = NULL;
+
ret = 0;
s = get_size (n);
GNUNET_assert (size >= s);
ret = 0;
s = get_size (n);
GNUNET_assert (size >= s);
@@
-290,8
+301,8
@@
notify_ready (void *cls, size_t size, void *buf)
{
if (th == NULL)
th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, s, 0,
{
if (th == NULL)
th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, s, 0,
- TIMEOUT
, ¬ify_ready
,
- NULL);
+ TIMEOUT
_TRANSMIT
,
+
¬ify_ready,
NULL);
msg_scheduled = n;
}
if (n % 5000 == 0)
msg_scheduled = n;
}
if (n % 5000 == 0)
@@
-348,7
+359,8
@@
sendtask ()
{
start_time = GNUNET_TIME_absolute_get ();
th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, get_size (0), 0,
{
start_time = GNUNET_TIME_absolute_get ();
th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, get_size (0), 0,
- TIMEOUT, ¬ify_ready, NULL);
+ TIMEOUT_TRANSMIT, ¬ify_ready,
+ NULL);
}
static void
}
static void