62 lines
2.0 KiB
Diff
62 lines
2.0 KiB
Diff
From 80c8dfe084f44eb660aa1af5b5d49e27e1dfd11e Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
|
|
Date: Mon, 10 Aug 2020 15:09:08 +0200
|
|
Subject: [PATCH] Convert int to string using strconv.Itoa
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
See https://github.com/golang/go/issues/32479
|
|
|
|
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
|
|
---
|
|
etcdserver/api/v2store/store_test.go | 3 ++-
|
|
wal/wal_test.go | 3 ++-
|
|
2 files changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/etcdserver/api/v2store/store_test.go b/etcdserver/api/v2store/store_test.go
|
|
index 76ec02d4e..0b1e9dad1 100644
|
|
--- a/etcdserver/api/v2store/store_test.go
|
|
+++ b/etcdserver/api/v2store/store_test.go
|
|
@@ -15,6 +15,7 @@
|
|
package v2store_test
|
|
|
|
import (
|
|
+ "strconv"
|
|
"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, strconv.Itoa(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
|
|
diff --git a/wal/wal_test.go b/wal/wal_test.go
|
|
index f457dbf3c..8e8a252a0 100644
|
|
--- a/wal/wal_test.go
|
|
+++ b/wal/wal_test.go
|
|
@@ -25,6 +25,7 @@ import (
|
|
"path/filepath"
|
|
"reflect"
|
|
"regexp"
|
|
+ "strconv"
|
|
"testing"
|
|
|
|
"go.etcd.io/etcd/pkg/fileutil"
|
|
@@ -239,7 +240,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" + strconv.Itoa(i+1))}}
|
|
if err = w.Save(raftpb.HardState{}, es); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
--
|
|
2.26.2
|
|
|