Skip to content

Commit

Permalink
[FIXED] TestJetStreamClusterDomainsAndSameNameSources
Browse files Browse the repository at this point in the history
Fix test that expects the get stream info on a mirroring stream right after the stream was created to contain the Mirror *SourceInfo. Rather than introduce a small delay before calling StreamInfo on that stream, check that the mirror is correctly defined in the stream config returned by StreamInfo instead.

Signed-off-by: Jean-Noël Moyne <jnmoyne@gmail.com>
  • Loading branch information
jnmoyne committed Sep 27, 2023
1 parent 279829d commit eedcf9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/jetstream_cluster_2_test.go
Expand Up @@ -1200,10 +1200,10 @@ func TestJetStreamClusterDomainsAndSameNameSources(t *testing.T) {
if err = json.Unmarshal(resp.Data, &ssi); err != nil {
t.Fatalf("Unexpected error: %v", err)
}
if ssi.Mirror == nil || ssi.Mirror.External == nil {
if ssi.Config.Mirror == nil || ssi.Config.Mirror.External == nil {
t.Fatalf("Expected a non-nil external designation for our mirror")
}
if ssi.Mirror.External.ApiPrefix != "$JS.SPOKE-1.API" {
if ssi.Config.Mirror.External.ApiPrefix != "$JS.SPOKE-1.API" {
t.Fatalf("Expected external api of %q, got %q", "$JS.SPOKE-1.API", ssi.Sources[0].External.ApiPrefix)
}
}
Expand Down

0 comments on commit eedcf9c

Please sign in to comment.