Fix the try on bb594652: a const batch gap unit tests assert directly, wait for the bundle's own subscribe before publishing, and a migration-0001 database built through the real path (issues 1520, 1518, 1431, 1517)

This commit is contained in:
jochen
2026-10-21 01:24:57 +02:00
parent bb594652fa
commit cfea9de530
7 changed files with 190 additions and 36 deletions
@@ -0,0 +1,17 @@
//go:build !integration
package main
import "testing"
// TestRunningBatchGapIsMinBatchGap (1520/AC1, ADR 0459 §15, issue 1520 — fixed per the lead's try feedback
// on bb594652): the gap the running binary actually paces its batches by (BatchGap, the var RunBatches
// reads) is MinBatchGap, exactly, in any build this test is itself part of. This file's own `!integration`
// tag keeps it out of a `-tags integration` build entirely — batch_gap_integration.go's init, which
// shortens BatchGap for that build alone, is never even compiled alongside this assertion — so no
// production path is ever caught lowering the pace.
func TestRunningBatchGapIsMinBatchGap(t *testing.T) {
if BatchGap != MinBatchGap {
t.Fatalf("BatchGap = %s, want MinBatchGap (%s): no production path may lower the pace", BatchGap, MinBatchGap)
}
}