Skip to content

Commit

Permalink
add some print stmts
Browse files Browse the repository at this point in the history
  • Loading branch information
bharath-123 committed Jun 3, 2024
1 parent b088be5 commit 7d59143
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions accounts/keystore/account_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func waitForAccounts(wantAccounts []accounts.Account, ks *KeyStore) error {
var list []accounts.Account
for t0 := time.Now(); time.Since(t0) < 5*time.Second; time.Sleep(100 * time.Millisecond) {
list = ks.Accounts()
fmt.Printf("list: %v\n", list)
if reflect.DeepEqual(list, wantAccounts) {
// ks should have also received change notifications
select {
Expand Down Expand Up @@ -346,6 +347,7 @@ func TestUpdatedKeyfileContents(t *testing.T) {
}

// ks should see the account.
fmt.Printf("Running test for part 0")
wantAccounts := []accounts.Account{cachetestAccounts[0]}
wantAccounts[0].URL = accounts.URL{Scheme: KeyStoreScheme, Path: file}
if err := waitForAccounts(wantAccounts, ks); err != nil {
Expand All @@ -360,6 +362,7 @@ func TestUpdatedKeyfileContents(t *testing.T) {
t.Fatal(err)
return
}
fmt.Printf("Running test for part 1")
wantAccounts = []accounts.Account{cachetestAccounts[1]}
wantAccounts[0].URL = accounts.URL{Scheme: KeyStoreScheme, Path: file}
if err := waitForAccounts(wantAccounts, ks); err != nil {
Expand All @@ -378,6 +381,7 @@ func TestUpdatedKeyfileContents(t *testing.T) {
}
wantAccounts = []accounts.Account{cachetestAccounts[2]}
wantAccounts[0].URL = accounts.URL{Scheme: KeyStoreScheme, Path: file}
fmt.Printf("Running test for part 2")
if err := waitForAccounts(wantAccounts, ks); err != nil {
t.Errorf("Second replacement failed")
t.Error(err)
Expand Down

0 comments on commit 7d59143

Please sign in to comment.