Skip to content

Commit

Permalink
Merge branch 'master' of github.com:nats-io/gnatsd into fix_symlink_g…
Browse files Browse the repository at this point in the history
…arbage
  • Loading branch information
tylertreat committed Jul 11, 2017
2 parents 10c70cb + 8a1ac81 commit 136355f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions server/reload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,8 @@ func TestConfigReloadEnableClusterAuthorization(t *testing.T) {
defer os.Remove(srvaConfig)
defer srva.Shutdown()

checkClusterFormed(t, srva, srvb)

srvaAddr := fmt.Sprintf("nats://%s:%d", srvaOpts.Host, srvaOpts.Port)
srvaConn, err := nats.Connect(srvaAddr)
if err != nil {
Expand Down Expand Up @@ -1134,7 +1136,7 @@ func TestConfigReloadEnableClusterAuthorization(t *testing.T) {
if err := srva.Reload(); err != nil {
t.Fatalf("Error reloading config: %v", err)
}
time.Sleep(10 * time.Millisecond)
checkClusterFormed(t, srva, srvb)

if numRoutes := srvb.NumRoutes(); numRoutes != 1 {
t.Fatalf("Expected 1 route, got %d", numRoutes)
Expand Down Expand Up @@ -1167,6 +1169,8 @@ func TestConfigReloadDisableClusterAuthorization(t *testing.T) {
defer os.Remove(srvaConfig)
defer srva.Shutdown()

checkClusterFormed(t, srva, srvb)

srvaAddr := fmt.Sprintf("nats://%s:%d", srvaOpts.Host, srvaOpts.Port)
srvaConn, err := nats.Connect(srvaAddr)
if err != nil {
Expand Down Expand Up @@ -1213,6 +1217,8 @@ func TestConfigReloadDisableClusterAuthorization(t *testing.T) {
t.Fatalf("Error reloading config: %v", err)
}

checkClusterFormed(t, srva, srvb)

if numRoutes := srvb.NumRoutes(); numRoutes != 1 {
t.Fatalf("Expected 1 route, got %d", numRoutes)
}
Expand Down Expand Up @@ -1244,6 +1250,8 @@ func TestConfigReloadClusterRoutes(t *testing.T) {
defer os.Remove(srvaConfig)
defer srva.Shutdown()

checkClusterFormed(t, srva, srvb)

srvcOpts, err := ProcessConfigFile("./configs/reload/srv_c_1.conf")
if err != nil {
t.Fatalf("Error processing config file: %v", err)
Expand Down Expand Up @@ -1302,7 +1310,7 @@ func TestConfigReloadClusterRoutes(t *testing.T) {
if err := srva.Reload(); err != nil {
t.Fatalf("Error reloading config: %v", err)
}
time.Sleep(20 * time.Millisecond)
checkClusterFormed(t, srva, srvc)

srvcAddr := fmt.Sprintf("nats://%s:%d", srvcOpts.Host, srvcOpts.Port)
srvcConn, err := nats.Connect(srvcAddr)
Expand Down

0 comments on commit 136355f

Please sign in to comment.