Fix the try: guard shared test state with mutexes, pgxpool over one conn, a short batch gap for integration builds, unique+forced database drops (issues 1431, 1524, 1517)
This commit is contained in:
@@ -16,8 +16,13 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// BatchGap is how long must pass between the start of one batch and the next (ADR 0459 §15, 1520/AC1).
|
||||
const BatchGap = 160 * time.Second
|
||||
// BatchGap is how long must pass between the start of one batch and the next (ADR 0459 §15, 1520/AC1): a
|
||||
// var, never a setting, so an integration test can shorten it in its own build alone (issue 1431's own
|
||||
// fix: batch_gap_integration.go, `//go:build integration`, never part of a production build) without
|
||||
// production pacing ever becoming configurable. Every normal build (including every unit test) keeps this
|
||||
// at 160s; TestNextBatchWait and TestThirtyWaitingMailsRunAsThreeBatchesAtLeast160sApart still prove that
|
||||
// value, on a test clock, in batch_test.go.
|
||||
var BatchGap = 160 * time.Second
|
||||
|
||||
// JudgeWithin is the bound every judgement asks: never above 40 seconds (ADR 0459 §14, 1520/AC2).
|
||||
const JudgeWithin = 40 * time.Second
|
||||
|
||||
Reference in New Issue
Block a user