Commit 9df38511 by PLN (Algolia)

tests: seed the in-hour probe with a non-negative age (flaked outside minute 0)

parent 6a7c7ed4
...@@ -326,7 +326,7 @@ class DevnameTests(unittest.TestCase): ...@@ -326,7 +326,7 @@ class DevnameTests(unittest.TestCase):
def test_json_records_carries_the_spa_fields(self): def test_json_records_carries_the_spa_fields(self):
self.run_cli("ensure", "app", "--port", "8123", "--note", "demo app") self.run_cli("ensure", "app", "--port", "8123", "--note", "demo app")
now = int(time.time()) now = int(time.time())
self.seed_probes("app.localhost", [(now - now % 3600 + 60 - now, 1, 200, 12)]) # inside the current hour self.seed_probes("app.localhost", [(now % 3600 // 2, 1, 200, 12)]) # age = half the hour so far: always inside the current hour
recs = self.dn.json_records() recs = self.dn.json_records()
self.assertEqual(len(recs), 1) self.assertEqual(len(recs), 1)
r = recs[0] r = recs[0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment