aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Evangelatov <anton.evangelatov@gmail.com>2017-11-16 21:17:28 +0800
committerAnton Evangelatov <anton.evangelatov@gmail.com>2017-11-16 21:17:28 +0800
commit448abb61eba5f5acbafed46da405cf2f66582dd6 (patch)
treef440e9cf5b18a4e75c98be7abb69f1685af2f9fc
parent5aa3eac22d80c754d70651a918bccc9b3d1d216f (diff)
downloadgo-tangerine-448abb61eba5f5acbafed46da405cf2f66582dd6.tar
go-tangerine-448abb61eba5f5acbafed46da405cf2f66582dd6.tar.gz
go-tangerine-448abb61eba5f5acbafed46da405cf2f66582dd6.tar.bz2
go-tangerine-448abb61eba5f5acbafed46da405cf2f66582dd6.tar.lz
go-tangerine-448abb61eba5f5acbafed46da405cf2f66582dd6.tar.xz
go-tangerine-448abb61eba5f5acbafed46da405cf2f66582dd6.tar.zst
go-tangerine-448abb61eba5f5acbafed46da405cf2f66582dd6.zip
accounts/keystore: change modtime for test cases to be bigger than 1sec.
-rw-r--r--accounts/keystore/account_cache_test.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/accounts/keystore/account_cache_test.go b/accounts/keystore/account_cache_test.go
index e3dc31065..9bbc1b2ef 100644
--- a/accounts/keystore/account_cache_test.go
+++ b/accounts/keystore/account_cache_test.go
@@ -59,7 +59,7 @@ func TestWatchNewFile(t *testing.T) {
// Ensure the watcher is started before adding any files.
ks.Accounts()
- time.Sleep(200 * time.Millisecond)
+ time.Sleep(1000 * time.Millisecond)
// Move in the files.
wantAccounts := make([]accounts.Account, len(cachetestAccounts))
@@ -349,6 +349,8 @@ func TestUpdatedKeyfileContents(t *testing.T) {
return
}
+ time.Sleep(1000 * time.Millisecond)
+
// Now replace file contents
if err := forceCopyFile(file, cachetestAccounts[1].URL.Path); err != nil {
t.Fatal(err)
@@ -362,6 +364,8 @@ func TestUpdatedKeyfileContents(t *testing.T) {
return
}
+ time.Sleep(1000 * time.Millisecond)
+
// Now replace file contents again
if err := forceCopyFile(file, cachetestAccounts[2].URL.Path); err != nil {
t.Fatal(err)
@@ -374,6 +378,9 @@ func TestUpdatedKeyfileContents(t *testing.T) {
t.Error(err)
return
}
+
+ time.Sleep(1000 * time.Millisecond)
+
// Now replace file contents with crap
if err := ioutil.WriteFile(file, []byte("foo"), 0644); err != nil {
t.Fatal(err)