diff --git a/modules/mesh-delivery-contracts/go/clients/meshcatalogclient/branches_test.go b/modules/mesh-delivery-contracts/go/clients/meshcatalogclient/branches_test.go index 2dfade9d..0b44efa6 100644 --- a/modules/mesh-delivery-contracts/go/clients/meshcatalogclient/branches_test.go +++ b/modules/mesh-delivery-contracts/go/clients/meshcatalogclient/branches_test.go @@ -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 `.`, 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")