summaryrefslogtreecommitdiff
path: root/src/test/test_periodic_event.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test_periodic_event.c')
-rw-r--r--src/test/test_periodic_event.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test_periodic_event.c b/src/test/test_periodic_event.c
index 1a9f4351ea..bebbb5e584 100644
--- a/src/test/test_periodic_event.c
+++ b/src/test/test_periodic_event.c
@@ -16,6 +16,7 @@
#include "or.h"
#include "config.h"
+#include "hibernate.h"
#include "hs_service.h"
#include "main.h"
#include "periodic.h"
@@ -74,6 +75,9 @@ test_pe_launch(void *arg)
(void) arg;
hs_init();
+ /* We need to put tor in hibernation live state so the events requiring
+ * network gets enabled. */
+ consider_hibernation(time(NULL));
/* Hack: We'll set a dumb fn() of each events so they don't get called when
* dispatching them. We just want to test the state of the callbacks, not