Skip to content

Commit

Permalink
xds: register resources at the mgmt server before requesting them (#4406
Browse files Browse the repository at this point in the history
)
  • Loading branch information
easwars authored May 10, 2021
1 parent 98c895f commit b1940e1
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions xds/internal/test/xds_server_serving_mode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,6 @@ func (s) TestServerSideXDS_ServingModeChanges(t *testing.T) {
t.Fatalf("testutils.LocalTCPListener() failed: %v", err)
}

go func() {
if err := server.Serve(lis1); err != nil {
t.Errorf("Serve() failed: %v", err)
}
}()
go func() {
if err := server.Serve(lis2); err != nil {
t.Errorf("Serve() failed: %v", err)
}
}()

// Setup the management server to respond with server-side Listener
// resources for both listeners.
host1, port1, err := hostPortFromListener(lis1)
Expand All @@ -150,6 +139,17 @@ func (s) TestServerSideXDS_ServingModeChanges(t *testing.T) {
t.Fatal(err)
}

go func() {
if err := server.Serve(lis1); err != nil {
t.Errorf("Serve() failed: %v", err)
}
}()
go func() {
if err := server.Serve(lis2); err != nil {
t.Errorf("Serve() failed: %v", err)
}
}()

// Wait for both listeners to move to "serving" mode.
if err := waitForModeChange(ctx, modeTracker, lis1.Addr(), xds.ServingModeServing); err != nil {
t.Fatal(err)
Expand Down

0 comments on commit b1940e1

Please sign in to comment.