summaryrefslogtreecommitdiff
path: root/src/test/test_guardfraction.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test_guardfraction.c')
-rw-r--r--src/test/test_guardfraction.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/test/test_guardfraction.c b/src/test/test_guardfraction.c
index 3cc83f91c4..8173e44d47 100644
--- a/src/test/test_guardfraction.c
+++ b/src/test/test_guardfraction.c
@@ -281,7 +281,6 @@ test_parse_guardfraction_consensus(void *arg)
const char *guardfraction_str_bad2 = "GuardFraction=166"; /* no percentage */
routerstatus_t rs_bad2;
- int log_level = 0;
(void) arg;
/* GuardFraction use is currently disabled by default. So we need to
@@ -306,7 +305,7 @@ test_parse_guardfraction_consensus(void *arg)
memset(&rs_no_guard, 0, sizeof(routerstatus_t));
tt_assert(!rs_no_guard.is_possible_guard);
- log_level = setup_full_capture_of_logs(LOG_WARN);
+ setup_full_capture_of_logs(LOG_WARN);
retval = routerstatus_parse_guardfraction(guardfraction_str_good,
NULL, NULL,
&rs_no_guard);
@@ -314,8 +313,7 @@ test_parse_guardfraction_consensus(void *arg)
tt_assert(!rs_no_guard.has_guardfraction);
expect_single_log_msg_containing("Got GuardFraction for non-guard . "
"This is not supposed to happen.");
- teardown_capture_of_logs(log_level);
- log_level = 0;
+ teardown_capture_of_logs();
}
{ /* Bad GuardFraction. Function should fail and not apply. */
@@ -341,8 +339,7 @@ test_parse_guardfraction_consensus(void *arg)
}
done:
- if (log_level)
- teardown_capture_of_logs(log_level);
+ teardown_capture_of_logs();
}
/** Make sure that we use GuardFraction information when we should,