mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
20201103 no commit title check (#12447)
* Turn off checking of format of commit message. * scripts/fix.sh: Fix fixing whitespaces in *.sh scripts Aparently there is a difference between: find ./ -print0 -name *.sh and find ./ -name *.sh -print0 * etcdserver unit tests: Do not call .Fatalf(...) from not test's goroutine. Fixes following test failures: https://travis-ci.com/github/etcd-io/etcd/jobs/425920416 ``` % (cd server && go vet ./...) stderr: # go.etcd.io/etcd/server/v3/etcdserver stderr: etcdserver/server_test.go:1002:4: call to (*T).Fatalf from a non-test goroutine stderr: etcdserver/server_test.go:1166:4: call to (*T).Fatalf from a non-test goroutine FAIL: (code:2): % (cd server && go vet ./...) FAIL: 'run go vet ./...' checking failed (!=0 return code) FAIL: 'govet' failed at Tue Nov 3 04:07:47 UTC 2020 ```
This commit is contained in:
@@ -999,7 +999,8 @@ func TestSnapshot(t *testing.T) {
|
||||
defer func() { ch <- struct{}{} }()
|
||||
|
||||
if len(gaction) != 2 {
|
||||
t.Fatalf("len(action) = %d, want 2", len(gaction))
|
||||
t.Errorf("len(action) = %d, want 2", len(gaction))
|
||||
return
|
||||
}
|
||||
if !reflect.DeepEqual(gaction[0], testutil.Action{Name: "SaveSnap"}) {
|
||||
t.Errorf("action = %s, want SaveSnap", gaction[0])
|
||||
@@ -1156,6 +1157,7 @@ func TestTriggerSnap(t *testing.T) {
|
||||
|
||||
donec := make(chan struct{})
|
||||
go func() {
|
||||
defer close(donec)
|
||||
wcnt := 3 + snapc
|
||||
gaction, _ := p.Wait(wcnt)
|
||||
|
||||
@@ -1163,9 +1165,9 @@ func TestTriggerSnap(t *testing.T) {
|
||||
// (SnapshotCount+1) * Puts + SaveSnap = (SnapshotCount+1) * Save + SaveSnap + Release
|
||||
if len(gaction) != wcnt {
|
||||
t.Logf("gaction: %v", gaction)
|
||||
t.Fatalf("len(action) = %d, want %d", len(gaction), wcnt)
|
||||
t.Errorf("len(action) = %d, want %d", len(gaction), wcnt)
|
||||
return
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(gaction[wcnt-2], testutil.Action{Name: "SaveSnap"}) {
|
||||
t.Errorf("action = %s, want SaveSnap", gaction[wcnt-2])
|
||||
}
|
||||
@@ -1173,7 +1175,6 @@ func TestTriggerSnap(t *testing.T) {
|
||||
if !reflect.DeepEqual(gaction[wcnt-1], testutil.Action{Name: "Release"}) {
|
||||
t.Errorf("action = %s, want Release", gaction[wcnt-1])
|
||||
}
|
||||
close(donec)
|
||||
}()
|
||||
|
||||
for i := 0; i < snapc+1; i++ {
|
||||
|
||||
Reference in New Issue
Block a user