forked from Keelrleek/Harbor
Background compiles give way to the lander: the Logbook statistics and the results refresher wait while [logbook] lander_lock is fresh (under 60 min); the statistics tools run below normal priority and a timeout ends the whole tree (an orphaned cl.exe went on compiling main at normal priority); a retried statistics run no longer relogs the same commits
This commit is contained in:
1 parent
21b7fedb6f
commit
56308e3aab
5 files changed
+154
-14
No files matched your search
@@ -208,6 +208,19 @@ class Refresher(HarborCase):
|
||||
rr.save_state(self.h.project, st)
|
||||
self.assertIsNone(rr.freshness(self.h.project)["match"]["sha"])
|
||||
|
||||
def test_waits_while_the_lander_runs_its_gates(self):
|
||||
lock = self.dir / "lander-busy.lock"
|
||||
self.h.project.logbook["lander_lock"] = str(lock)
|
||||
lock.write_text("lander", encoding="utf-8")
|
||||
os.utime(lock, (T0 - 300, T0 - 300))
|
||||
rr.request(self.h.project, "match")
|
||||
out = rr.tick(self.h.project, now=T0, hour=12)
|
||||
self.assertIn("lander", out["waiting"])
|
||||
self.assertEqual(self.calls, [])
|
||||
self.assertEqual(rr._requested(self.h.project), {"match"}) # kept for the next look
|
||||
self.assertTrue(rr.tick(self.h.project, now=T0 + 61 * 60, hour=12)["ok"]) # a lock over an hour old is stale
|
||||
self.assertEqual(len(self.calls), 1)
|
||||
|
||||
def test_runs_at_idle_priority(self):
|
||||
seen = {}
|
||||
|
||||
|
||||
Reference in new issue
Block a user