summaryrefslogtreecommitdiff
path: root/src/test/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test.c')
-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));