summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2010-09-29 23:52:18 -0400
committerRoger Dingledine <arma@torproject.org>2010-09-29 23:52:18 -0400
commit3cbe463e964d71b401e11b29dc356bf6ef855f7f (patch)
tree861c423a9555f39dcc14e661eed27bf36d1a9a44 /src/test
parent48cd096276590e40540bc255b2610931351b14cb (diff)
parentf2aa8f08cb6a5a258eadf05ca157ec43b975706a (diff)
downloadtor-3cbe463e964d71b401e11b29dc356bf6ef855f7f.tar.gz
tor-3cbe463e964d71b401e11b29dc356bf6ef855f7f.zip
Merge branch 'bug1772' into 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));