aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2010-09-30 00:10:14 -0400
committerRoger Dingledine <arma@torproject.org>2010-09-30 00:10:14 -0400
commitea6ac0f0d1faa946df7336d65eddb54172b7ecd4 (patch)
treec755186304ceb516b4be450ddf254143b2c1eb3b /src/test
parent355fc63790bedfd00c062d6aa8d60f00307dc03f (diff)
parentd17fcad3ae183d9a9bc9a0e3d1c159b6d8c261b8 (diff)
downloadtor-ea6ac0f0d1faa946df7336d65eddb54172b7ecd4.tar.gz
tor-ea6ac0f0d1faa946df7336d65eddb54172b7ecd4.zip
Merge branch 'maint-0.2.2'
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/src/test/test.c b/src/test/test.c
index d9528328b8..8d8c46fca2 100644
--- a/src/test/test.c
+++ b/src/test/test.c
@@ -499,28 +499,14 @@ test_circuit_timeout(void)
build_times_idx = estimate.build_times_idx;
total_build_times = estimate.total_build_times;
- for (i = 0; i < CBT_NETWORK_NONLIVE_TIMEOUT_COUNT; i++) {
- test_assert(circuit_build_times_network_check_live(&estimate));
- test_assert(circuit_build_times_network_check_live(&final));
-
- circuit_build_times_count_close(&estimate, 0,
- (time_t)(approx_time()-estimate.close_ms/1000.0-1));
- circuit_build_times_count_close(&final, 0,
- (time_t)(approx_time()-final.close_ms/1000.0-1));
- }
-
- test_assert(!circuit_build_times_network_check_live(&estimate));
- test_assert(!circuit_build_times_network_check_live(&final));
- for ( ; i < CBT_NETWORK_NONLIVE_DISCARD_COUNT; i++) {
- circuit_build_times_count_close(&estimate, 0,
- (time_t)(approx_time()-estimate.close_ms/1000.0-1));
+ test_assert(circuit_build_times_network_check_live(&estimate));
+ test_assert(circuit_build_times_network_check_live(&final));
- if (i < CBT_NETWORK_NONLIVE_DISCARD_COUNT-1) {
- circuit_build_times_count_close(&final, 0,
- (time_t)(approx_time()-final.close_ms/1000.0-1));
- }
- }
+ circuit_build_times_count_close(&estimate, 0,
+ (time_t)(approx_time()-estimate.close_ms/1000.0-1));
+ circuit_build_times_count_close(&final, 0,
+ (time_t)(approx_time()-final.close_ms/1000.0-1));
test_assert(!circuit_build_times_network_check_live(&estimate));
test_assert(!circuit_build_times_network_check_live(&final));