-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure query is canceled after account rewind. #893
Changes from all commits
757e7ad
93149db
815a62d
dfe7967
aef1602
973dbec
95d4066
1a5ea7d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,10 +67,12 @@ func TestStaleTransactions1(t *testing.T) { | |
Round: 8, | ||
} | ||
|
||
var outCh <-chan idb.TxnRow | ||
ch := make(chan idb.TxnRow) | ||
var outCh <-chan idb.TxnRow = ch | ||
close(ch) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tolikzinovyev this was the test bug. The channel must be closed now otherwise the channel can't be drained. |
||
|
||
db := &mocks.IndexerDb{} | ||
db.On("GetSpecialAccounts").Return(transactions.SpecialAddresses{}, nil) | ||
db.On("GetSpecialAccounts", mock.Anything).Return(transactions.SpecialAddresses{}, nil) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure why this one was working. It should have started failing once we added the context to this function. |
||
db.On("Transactions", mock.Anything, mock.Anything).Return(outCh, uint64(7)).Once() | ||
|
||
account, err := AccountAtRound(context.Background(), account, 6, db) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go test
times out after 10 minutes. Change the CircleCI timeout to something larger than that so that the timeout error is properly reported.