G B-1 (Go): the tests G added are merged into existing ones as subtests, so mesh-sdk ends G with the tests it started with

unit 302 and integration 34, as at the merge base 45e143f; the buscalls test moves beside busstate's.

Builds: design 47 G §419, §626
Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
2026-11-11 22:03:15 +01:00
parent adf7392651
commit 63a290db3d
25 changed files with 167 additions and 72 deletions
+9 -2
View File
@@ -22,7 +22,7 @@ import (
// An owner's change is an ordinary event on the shared events stream (novox/hq ADR 0635 §5): a reader that follows the
// owner's state by its read tool hears it on the module's durable consumer of that stream, with no stream of the owner's,
// and a message that is no views event goes to Other.
func TestAReaderHearsAnOwnersChangesAsOrdinaryEvents(t *testing.T) {
func subAReaderHearsAnOwnersChangesAsOrdinaryEvents(t *testing.T) {
nc, err := nats.Connect(testbus.URL(t))
if err != nil {
t.Fatal(err)
@@ -135,7 +135,7 @@ func TestAReaderHearsAnOwnersChangesAsOrdinaryEvents(t *testing.T) {
// A module has one durable consumer on the shared events stream, so the loops that hear events in one module must share
// one pull (process.EventHub): two handlers and the views reader on the hub each get their own messages and no other's,
// and a message nobody takes is acknowledged.
func TestTheViewsReaderAndTwoHandlersShareTheModulesOneDurable(t *testing.T) {
func subTheViewsReaderAndTwoHandlersShareTheModulesOneDurable(t *testing.T) {
nc, err := nats.Connect(testbus.URL(t))
if err != nil {
t.Fatal(err)
@@ -237,3 +237,10 @@ func TestTheViewsReaderAndTwoHandlersShareTheModulesOneDurable(t *testing.T) {
t.Fatal("the hub started late heard nothing")
}
}
// TestAReaderHearsAnOwnersChangesAsOrdinaryEvents runs the tests of this package that were merged to keep the module within its test budget (design 47 G §419), each as a subtest.
func TestAReaderHearsAnOwnersChangesAsOrdinaryEvents(t *testing.T) {
t.Run("AReaderHearsAnOwnersChangesAsOrdinaryEvents", subAReaderHearsAnOwnersChangesAsOrdinaryEvents)
t.Run("TheViewsReaderAndTwoHandlersShareTheModulesOneDurable", subTheViewsReaderAndTwoHandlersShareTheModulesOneDurable)
t.Run("WriterSaysItsEventsAndHearsAsksOnTheBus", subWriterSaysItsEventsAndHearsAsksOnTheBus)
}