Merge branch 'main' into dev

This commit is contained in:
Derek Collison
2023-06-07 14:31:53 -07:00
2 changed files with 39 additions and 1 deletions

View File

@@ -41,7 +41,7 @@ var (
const (
// VERSION is the current version for the server.
VERSION = "2.10.0-beta.40"
VERSION = "2.10.0-beta.41"
// PROTO is the currently supported protocol.
// 0 was the original

View File

@@ -4280,6 +4280,44 @@ func TestJetStreamClusterLeafnodePlusDaisyChainSetup(t *testing.T) {
// Third hop from AP -> CN is 1F, 1T, 1T and 1T
// Each cluster hop that has the export/import mapping will add another T message copy.
checkSubsPending(t, tsub, num*4)
// Create stream in cloud.
nc, js := jsClientConnect(t, c.randomServer(), nats.UserInfo("F", "pass"))
defer nc.Close()
_, err = js.AddStream(&nats.StreamConfig{
Name: "TEST",
Subjects: []string{"TEST.>"},
Replicas: 3,
})
require_NoError(t, err)
for i := 0; i < 100; i++ {
sendStreamMsg(t, nc, fmt.Sprintf("TEST.%d", i), "OK")
}
// Now connect to EU.
nc, js = jsClientConnect(t, lceu.randomServer(), nats.UserInfo("F", "pass"))
defer nc.Close()
// Create a mirror.
_, err = js.AddStream(&nats.StreamConfig{
Name: "M",
Mirror: &nats.StreamSource{
Name: "TEST",
Domain: "CLOUD",
},
})
require_NoError(t, err)
checkFor(t, time.Second, 200*time.Millisecond, func() error {
si, err := js.StreamInfo("M")
require_NoError(t, err)
if si.State.Msgs == 100 {
return nil
}
return fmt.Errorf("State not current: %+v", si.State)
})
}
// https://github.com/nats-io/nats-server/pull/4197