-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[SHIP-3903]Remove WS requirement for data feeds soak tests #15003
Conversation
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.
LGTM
integration-tests/testsetups/ocr.go
Outdated
|
||
// Track last checked block number and update starting block number | ||
lastCheckedBlockNum = latestBlock | ||
startingBlockNum = latestBlock + 1 |
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.
Minor nit: can we just repurpose startingBlockNum to check for the lastCheckedBlockNum. Not a big deal but good for readability
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.
Thanks for the suggestion. Wanted to have a clear separation between the initial run and subsequent runs but it does not add that much value. Simpler code is always better.
for { | ||
select { | ||
case event := <-eventLogs: |
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.
Do you think its worth keeping the WSS option also?
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.
I would move onto polling. Seems more reliable and not prone to disconnections.
ec0cf6d
integration-tests/testsetups/ocr.go
Outdated
func (o *OCRSoakTest) pollingOCREvents(endTest <-chan time.Time) error { | ||
|
||
// Keep track of the last processed block number | ||
processedBlockNum := o.startingBlockNum - 1 | ||
|
||
go func() { |
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.
Out of scope, but this goroutine appears to be untracked.
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.
I have updated how this is handled and it is now tracked. Thanks for pointing it out.
integration-tests/testsetups/ocr.go
Outdated
|
||
go func() { | ||
// TODO: Make this configurable |
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.
For this PR or follow-up? Is there a ticket to link?
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.
Intention was for a follow up. Just created SHIP-3973 to cover it.
SHIP-3903
Switch from subscription to polling for logs to remove the requirement of having a WS endpoint.