代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/etcd 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。