[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r13613 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r13613 - gnunet/src/transport |
Date: |
Mon, 8 Nov 2010 14:21:12 +0100 |
Author: wachs
Date: 2010-11-08 14:21:12 +0100 (Mon, 08 Nov 2010)
New Revision: 13613
Modified:
gnunet/src/transport/test_quota_compliance.c
Log:
added check to prevent testcase to exit with success if throughput is 0
Modified: gnunet/src/transport/test_quota_compliance.c
===================================================================
--- gnunet/src/transport/test_quota_compliance.c 2010-11-08 11:12:48 UTC
(rev 13612)
+++ gnunet/src/transport/test_quota_compliance.c 2010-11-08 13:21:12 UTC
(rev 13613)
@@ -400,6 +400,23 @@
else
delta = (quota_allowed/10);
+ /* Throughput is far too slow. This is to prevent the test to exit with
success when throughput is 0 */
+ if ((total_bytes_sent/(duration.rel_value / 1000)) < 100)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "\nQuota compliance failed: \n"\
+ "Hard quota limit allowed: %10llu kB/s (%llu B/s)\n"\
+ "Soft quota limit allowed: %10llu kB/s (%llu B/s)\n"\
+ "Throughput : %10llu kB/s (%llu B/s)\n",
+ (quota_allowed / (1024)), quota_allowed,
+ ((quota_allowed+delta) / (1024)),
quota_allowed+delta,
+ (total_bytes_sent/(duration.rel_value / 1000)/1024),
+ total_bytes_sent/(duration.rel_value / 1000));
+ ok = 1;
+ end();
+ }
+
+ /* Throughput is bigger than allowed quota + some extra*/
if ((total_bytes_sent/(duration.rel_value / 1000)) > (quota_allowed + delta))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r13613 - gnunet/src/transport,
gnunet <=