Opened 8 years ago

Closed 8 years ago

#1779 closed defect (fixed)

unit test fails for TTLs

Reported by: jelte Owned by: jelte
Priority: medium Milestone: Sprint-20120320
Component: Unclassified Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DNS Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

Looks like we can cross the seconds boundary between the creation of a cache value and its retrieval, so we need to be a little bit smarter in the corresponding tests

Subtickets

Change History (5)

comment:1 Changed 8 years ago by jelte

  • Milestone changed from New Tasks to Sprint-20120320
  • Owner changed from jelte to UnAssigned
  • Status changed from new to reviewing

changes are quite straightforward i think, this should fix errors like http://git.bind10.isc.org/~tester/builder//BIND10/20120314132000-Solaris10-sparc-GCC/logs/unittests.out

comment:2 Changed 8 years ago by jinmei

  • Owner changed from UnAssigned to jinmei

comment:3 Changed 8 years ago by jinmei

Looks okay, but I first didn't understand why you changed the sleep
time. I now think I understand it (I guess it's for avoiding false
negatives in the "count down" cases), but I think it'd be nice to make
an explicit comment about the rationale.

comment:4 Changed 8 years ago by jinmei

  • Owner changed from jinmei to jelte

comment:5 Changed 8 years ago by jelte

  • Resolution set to fixed
  • Status changed from reviewing to closed

Thanks for the quick review.

The increased sleep time is indeed to make sure the two range checks do not overlap (without it there would be a chance that the ttl is never updated and we wouldn't catch it).

Added a comment to that affect

merged, closing ticket

Note: See TracTickets for help on using tickets.