mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #12198 from ptabor/20200803-int-to-string-test-fix
etcdserver, wal: Fix tests unintended CASTing of int->String.
This commit is contained in:
commit
ed27d9d2de
@ -15,6 +15,7 @@
|
||||
package v2store_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@ -844,7 +845,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, fmt.Sprint(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
|
||||
|
@ -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(fmt.Sprintf("waldata%d", i+1))}}
|
||||
if err = w.Save(raftpb.HardState{}, es); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user