提交 98db08c4 编写于 作者: J Jeffrey Wilcke

Merge pull request #1548 from fjl/accounts-test-deflake

accounts: bump timeout in TestSignRace
...@@ -128,7 +128,7 @@ func TestSignRace(t *testing.T) { ...@@ -128,7 +128,7 @@ func TestSignRace(t *testing.T) {
if err := am.TimedUnlock(a1.Address, "", 15*time.Millisecond); err != nil { if err := am.TimedUnlock(a1.Address, "", 15*time.Millisecond); err != nil {
t.Fatalf("could not unlock the test account", err) t.Fatalf("could not unlock the test account", err)
} }
end := time.Now().Add(80 * time.Millisecond) end := time.Now().Add(500 * time.Millisecond)
for time.Now().Before(end) { for time.Now().Before(end) {
if _, err := am.Sign(a1, testSigData); err == ErrLocked { if _, err := am.Sign(a1, testSigData); err == ErrLocked {
return return
...@@ -136,6 +136,7 @@ func TestSignRace(t *testing.T) { ...@@ -136,6 +136,7 @@ func TestSignRace(t *testing.T) {
t.Errorf("Sign error: %v", err) t.Errorf("Sign error: %v", err)
return return
} }
time.Sleep(1 * time.Millisecond)
} }
t.Errorf("Account did not lock within the timeout") t.Errorf("Account did not lock within the timeout")
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册