seatgen -check passes at the join: the catalog client's test imports no bus client
branches_test.go named nats.ErrNoResponders for a call that reached no holder, so the generator's
check refused the contracts module ("a client uses only its seat's contract and mesh-sdk's runtime",
ADR 0625 §3), met twice at join 11. The test now gives the words a runtime passes that refusal on
with, which busretry.Undelivered reads the same way.
Builds: design 47 G A-170 (the regenerated contracts, checked in place)
Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -3,6 +3,7 @@ package meshcatalogclient
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"slices"
|
||||
"strings"
|
||||
@@ -14,7 +15,6 @@ import (
|
||||
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-sdk/sourcebranches"
|
||||
"git.novox.be/novox/mesh-sdk/go/busretry"
|
||||
"git.novox.be/novox/mesh-sdk/go/views"
|
||||
"github.com/nats-io/nats.go"
|
||||
)
|
||||
|
||||
// fakeWiring is a part's reader: it keeps the views adopted, by `<owner>.<state>`, and says each drop.
|
||||
@@ -255,7 +255,11 @@ func TestEntriesAreAskedOnceAnsweredOrNotFound(t *testing.T) {
|
||||
if rows := viaConn.Rows(); len(rows) != 1 || rows[0].State != EntryNotFound || rows[0].Detail == "" || len(toldConn) == 0 {
|
||||
t.Fatalf("the holder's answer through a process's call: rows %+v, told %d", rows, len(toldConn))
|
||||
}
|
||||
unreached := NewEntries(func(string, any) (json.RawMessage, error) { return nil, nats.ErrNoResponders })
|
||||
// A call that reached no holder, in the words a runtime passes the bus's refusal on with (busretry.Undelivered): a client's
|
||||
// test imports only its seat's contract and mesh-sdk's runtime (ADR 0625 §3), never the bus's client.
|
||||
unreached := NewEntries(func(string, any) (json.RawMessage, error) {
|
||||
return nil, errors.New("nats: no responders available for request")
|
||||
})
|
||||
unreached.Changed = func(r EntryRow) { t.Errorf("a call that reached no holder told %+v", r) }
|
||||
if err := unreached.Again(ctx, "src2:x"); err == nil {
|
||||
t.Fatal("again of an entry never needed answers no error")
|
||||
|
||||
Reference in New Issue
Block a user