Parcourir la source

tests: Fix HS test against max IP lifetime.

 * FIXES part of #25450: https://bugs.torproject.org/25450
Isis Lovecruft il y a 6 ans
Parent
commit
66d3120634
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      src/test/test_hs_service.c

+ 3 - 1
src/test/test_hs_service.c

@@ -419,8 +419,10 @@ test_service_intro_point(void *arg)
      * surprisingly slow... */
     tt_u64_op(ip->time_to_expire, OP_GE,
               now + INTRO_POINT_LIFETIME_MIN_SECONDS - 500);
+    /* We add 500 seconds, because this time we're testing against the
+     * maximum allowed time. */
     tt_u64_op(ip->time_to_expire, OP_LE,
-              now + INTRO_POINT_LIFETIME_MAX_SECONDS - 500);
+              now + INTRO_POINT_LIFETIME_MAX_SECONDS + 500);
     tt_assert(ip->replay_cache);
     tt_assert(ip->base.link_specifiers);
     /* By default, this is NOT a legacy object. */