The library read now, from adb, stopping at the first sign of strain (1.0 RC3-9, build 51)
pauljd/davidson-ci: Davidson CI / quality (push) Failing after 4m30s
pauljd/davidson-ci: Davidson CI / ai-review (push) Failing after 2m10s
release-gate / verify (push) Successful in 11m36s

Paul, 15 November 2026: read the whole library for the Director's Chair now rather than over five nights, and stop if
the server starts straining. --ez orbit_catalogue_now true reads a page of 200 every 3 seconds, timing each; two slow
pages in a row (over 5 s), a failed page, or --ez orbit_catalogue_now_stop true ends it. Household edition only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 09:13:10 +00:00
co-authored by Claude Opus 5.5
parent f2beb6ed76
commit 57bc6dba09
5 changed files with 78 additions and 1 deletions
@@ -0,0 +1,23 @@
package tv.orbit.classic
import org.junit.Assert.*
import org.junit.Test
/** 15 November 2026: the library read now, stopping by itself at the first sign of strain. */
class CatalogueNowTest {
@Test fun oneSlowPageIsForgivenTwoInARowStopIt() {
CatalogueNow.stop = false
assertNull(CatalogueNow.verdict(1_000, false, 0))
assertNull(CatalogueNow.verdict(6_000, false, 0))
assertEquals("two slow pages in a row", CatalogueNow.verdict(6_000, false, 1))
assertEquals("a page failed", CatalogueNow.verdict(500, true, 0))
CatalogueNow.stop = true
assertEquals("asked to stop", CatalogueNow.verdict(500, false, 0))
CatalogueNow.stop = false
}
@Test fun thePaceStaysWellUnderWhatTheServerHandled() {
// 20 pages a minute at most, against ~126 requests a minute with no strain in the capacity test.
assertTrue(60_000 / CatalogueNow.PAGE_GAP_MS <= 20)
}
}