etcdserver,wal: Convert int to string using rune()

This commit is contained in:
Lili Cosic 2021-04-12 10:23:02 +02:00
parent 35bd924596
commit 0b7e4184e8
2 changed files with 2 additions and 2 deletions

View File

@ -844,7 +844,7 @@ func TestStoreWatchSlowConsumer(t *testing.T) {
s.Watch("/foo", true, true, 0) // stream must be true
// Fill watch channel with 100 events
for i := 1; i <= 100; i++ {
s.Set("/foo", false, string(i), v2store.TTLOptionSet{ExpireTime: v2store.Permanent}) // ok
s.Set("/foo", false, string(rune(i)), v2store.TTLOptionSet{ExpireTime: v2store.Permanent}) // ok
}
// testutil.AssertEqual(t, s.WatcherHub.count, int64(1))
s.Set("/foo", false, "101", v2store.TTLOptionSet{ExpireTime: v2store.Permanent}) // ok

View File

@ -239,7 +239,7 @@ func TestVerify(t *testing.T) {
// make 5 separate files
for i := 0; i < 5; i++ {
es := []raftpb.Entry{{Index: uint64(i), Data: []byte("waldata" + string(i+1))}}
es := []raftpb.Entry{{Index: uint64(i), Data: []byte("waldata" + string(rune(i+1)))}}
if err = w.Save(raftpb.HardState{}, es); err != nil {
t.Fatal(err)
}