[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r13532 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r13532 - gnunet/src/transport |
Date: |
Wed, 3 Nov 2010 15:16:23 +0100 |
Author: wachs
Date: 2010-11-03 15:16:23 +0100 (Wed, 03 Nov 2010)
New Revision: 13532
Modified:
gnunet/src/transport/test_quota_compliance.c
Log:
test has to be more flexible with lower quota value
Modified: gnunet/src/transport/test_quota_compliance.c
===================================================================
--- gnunet/src/transport/test_quota_compliance.c 2010-11-03 13:09:02 UTC
(rev 13531)
+++ gnunet/src/transport/test_quota_compliance.c 2010-11-03 14:16:23 UTC
(rev 13532)
@@ -48,6 +48,8 @@
#define MEASUREMENT_MAX_QUOTA 1024 * 1024 * 1024
#define MEASUREMENT_MIN_QUOTA 1024
#define SEND_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
10)
+#define MEASUREMENT_SOFT_LIMIT 1024
+
/**
* Testcase timeout
*/
@@ -363,6 +365,8 @@
{
static int strike_counter;
unsigned long long quota_allowed = 0;
+ int delta = 0;
+
measurement_task = GNUNET_SCHEDULER_NO_TASK;
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
return;
@@ -391,7 +395,13 @@
else
quota_allowed = current_quota_p2;
- if ((total_bytes_sent/(duration.rel_value / 1000)) > (quota_allowed +
(quota_allowed / 10)))
+
+ if (MEASUREMENT_SOFT_LIMIT > (quota_allowed/10))
+ delta = MEASUREMENT_SOFT_LIMIT;
+ else
+ delta = (quota_allowed/10);
+
+ if ((total_bytes_sent/(duration.rel_value / 1000)) > (quota_allowed + delta))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"\nQuota compliance failed: \n"\
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r13532 - gnunet/src/transport,
gnunet <=