-
Notifications
You must be signed in to change notification settings - Fork 105
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
test(ethexe): Introduce two-step Service
run
#4311
base: master
Are you sure you want to change the base?
Conversation
Add docs
I'd say that tests are really fragile: removing timers results in underlying spawned tasks being not synchronized, which creates many obstacles in testing. The approach to test impl should be changed in future, so we can write them easily without thinking too much about underlying details of how 6e450c4 - this works perfectly fine, but requires some timeout for sync. a465d72 - this avoids sync problems when channgels try to read data, when there's no actual data sent from the |
let events_stream_producer = observer.events_stream_producer(); | ||
|
||
self.run_inner(events_stream_producer).await.map_err(|err| { | ||
log::error!("Service finished work with error: {:?}", err); |
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.
log::error!("Service finished work with error: {:?}", err); | |
log::error!("Service finished work with error: {err:?}"); |
@@ -297,7 +297,9 @@ impl<T: Transport + Clone, N: Network> TryGetReceipt<T, N> for PendingTransactio | |||
Err(err) => err, | |||
}; | |||
|
|||
for _ in 0..3 { | |||
log::trace!("Failed to get transaction receipt for {tx_hash}. Retrying..."); | |||
for n in 0..25 { |
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.
it's ok for tests, but bad for production
rpc, | ||
block_time, | ||
signer: _signer, |
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.
signer: _signer, |
.run_inner(events_stream_producer) | ||
.await | ||
.map_err(|err| { | ||
log::error!("Service finished work with error: {:?}", err); |
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.
log::error!("Service finished work with error: {:?}", err); | |
log::error!("Service finished work with error: {err:?}"); |
Resolves #4099
TODO:
EventsStreamProducer