anoma / namada

Rust implementation of Namada, a Proof-of-Stake L1 for interchain asset-agnostic privacy
https://namada.net
GNU General Public License v3.0
2.4k stars 949 forks source link

Improves on `try_recv` in e2e tests #3897

Open grarco opened 2 weeks ago

grarco commented 2 weeks ago

About the mpsc channel read loop in e2e tests https://github.com/anoma/namada/blob/45e7e909c588e7c9afba078d38f33a210f7bd839/crates/tests/src/e2e/setup.rs#L899

          unrelated to this PR, but this `try_recv` might be contributing substantially to the resource usage of e2e tests :P

_Originally posted by @sug0 in https://github.com/anoma/namada/pull/3894#discussion_r1789720099_

Seems like the solution is to call recv_timeout instead with a sane timeout

grarco commented 1 week ago

I've actually tried to implement this and the tests started to fail. Specifically they fail in exp_regex on a Hermes NamadaCmd because of a timeout on the output stream when creating the IBC channel (create_channel_ibc_with_hermes). This does not depend on the specific timeout we set neither in recv_timeout nor in the Session. It could be due to the Session instances of Namada and Gaia controlling the streams of their processes: being blocked would prevent them from replying to the Hermes requests