Skip to content

Commit

Permalink
address
Browse files Browse the repository at this point in the history
  • Loading branch information
nolouch committed May 18, 2017
1 parent a62739b commit 458a3a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion server/api/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (s *testClusterInfo) TestGetClusterStatus(c *C) {
url := fmt.Sprintf("%s/cluster/status", s.urlPrefix)
status := server.ClusterStatus{}
err := readJSONWithURL(url, &status)
c.Assert(status.RaftBootstrapTime, IsNil)
c.Assert(status.RaftBootstrapTime, Equals, time.Time{})
now := time.Now()
mustBootstrapCluster(c, s.svr)
err = readJSONWithURL(url, &status)
Expand Down
6 changes: 2 additions & 4 deletions server/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ type RaftCluster struct {

// ClusterStatus saves some state information
type ClusterStatus struct {
RaftBootstrapTime *time.Time `json:"raft_bootstrap_time,omitempty"`
RaftBootstrapTime time.Time `json:"raft_bootstrap_time,omitempty"`
}

func newRaftCluster(s *Server, clusterID uint64) *RaftCluster {
Expand All @@ -84,9 +84,7 @@ func (c *RaftCluster) loadClusterStatus() error {
if err != nil {
return errors.Trace(err)
}
if t != zeroTime {
status.RaftBootstrapTime = &t
}
status.RaftBootstrapTime = t
c.status = status
return nil
}
Expand Down

0 comments on commit 458a3a3

Please sign in to comment.