Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
FinnTew committed Jan 20, 2025
1 parent ba98be6 commit e627036
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/consistency_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@ var _ = Describe("Consistency", Ordered, func() {
Expect(leader).NotTo(BeNil())
// TODO don't assert FlushDB's result, bug will fixed by issue #401
//Expect(leader.FlushDB(ctx).Err().Error()).To(Equal("ERR PRAFT is not initialized"))
// if res := leader.FlushDB(ctx); res.Err() == nil || res.Err().Error() != "ERR PRAFT is not initialized" {
// fmt.Println("[Consistency]FlushDB error: ", res.Err())
// }
if res := leader.FlushDB(ctx); res.Err() == nil || res.Err().Error() != "ERR PRAFT is not initialized" {
fmt.Println("[Consistency]FlushDB error: ", res.Err())
}
} else {
c := s.NewClient()
Expect(c).NotTo(BeNil())
// TODO don't assert FlushDB's result, bug will fixed by issue #401
//Expect(c.FlushDB(ctx).Err().Error()).To(Equal("ERR PRAFT is not initialized"))
// if res := c.FlushDB(ctx); res.Err() == nil || res.Err().Error() != "ERR PRAFT is not initialized" {
// fmt.Println("[Consistency]FlushDB error: ", res.Err())
// }
if res := c.FlushDB(ctx); res.Err() == nil || res.Err().Error() != "ERR PRAFT is not initialized" {
fmt.Println("[Consistency]FlushDB error: ", res.Err())
}
followers = append(followers, c)
}
}
Expand Down Expand Up @@ -103,9 +103,9 @@ var _ = Describe("Consistency", Ordered, func() {
Expect(leader).NotTo(BeNil())
// TODO don't assert FlushDB's result, bug will fixed by issue #401
//Expect(leader.FlushDB(ctx).Err()).NotTo(HaveOccurred())
// if res := leader.FlushDB(ctx); res.Err() != nil {
// fmt.Println("[Consistency]FlushDB error: ", res.Err())
// }
if res := leader.FlushDB(ctx); res.Err() != nil {
fmt.Println("[Consistency]FlushDB error: ", res.Err())
}

info, err := leader.Do(ctx, "info", "raft").Result()
Expect(err).NotTo(HaveOccurred())
Expand All @@ -122,9 +122,9 @@ var _ = Describe("Consistency", Ordered, func() {
Expect(c).NotTo(BeNil())
// TODO don't assert FlushDB's result, bug will fixed by issue #401
//Expect(c.FlushDB(ctx).Err().Error()).To(Equal("ERR -MOVED 127.0.0.1:12111"))
// if res := c.FlushDB(ctx); res.Err() != nil {
// fmt.Println("[Consistency]FlushDB error: ", res.Err())
// }
if res := c.FlushDB(ctx); res.Err() != nil {
fmt.Println("[Consistency]FlushDB error: ", res.Err())
}
followers = append(followers, c)

info, err := c.Do(ctx, "info", "raft").Result()
Expand Down

0 comments on commit e627036

Please sign in to comment.