Abstract
Building on the tests being added to the amaru-consensus crate for connecting Amaru initiator and responder (e.g. #653) we add tests that spawn initiator and responder in different processes, connected by a software configurable network setup like netsim-embed.
Why?
Tests on the application level cannot reliably reproduce or exercise the low-level networking issues that we will inevitably face when running in production. For this, we’ll need to be able to introduce deliberate (transient) packet loss, delays, etc. under the control of the test procedure.
How?
The technical implementation uses network namespaces and virtual interface devices, exactly the tools that Docker uses to create dedicated networks for its containers. netsim-embed makes this quite easy and also provides the capability to communicate between the processes under test for the purpose of coordinating the implementation of the desired networking scenario (e.g. when to block or release network traffic).
Testing Strategy / Acceptance Criteria
Migrate the current tests where initiator starts first or where responder becomes unresponsive during the connection to the newly created netsim-enabled facilities. This demonstrates how to control the network and thus enables future creation of specific regression test scenarios or other scope extensions.
Discussion points
No response
Dependencies & Related Tasks
No response
Checklist
Abstract
Building on the tests being added to the amaru-consensus crate for connecting Amaru initiator and responder (e.g. #653) we add tests that spawn initiator and responder in different processes, connected by a software configurable network setup like netsim-embed.
Why?
Tests on the application level cannot reliably reproduce or exercise the low-level networking issues that we will inevitably face when running in production. For this, we’ll need to be able to introduce deliberate (transient) packet loss, delays, etc. under the control of the test procedure.
How?
The technical implementation uses network namespaces and virtual interface devices, exactly the tools that Docker uses to create dedicated networks for its containers. netsim-embed makes this quite easy and also provides the capability to communicate between the processes under test for the purpose of coordinating the implementation of the desired networking scenario (e.g. when to block or release network traffic).
Testing Strategy / Acceptance Criteria
Migrate the current tests where initiator starts first or where responder becomes unresponsive during the connection to the newly created netsim-enabled facilities. This demonstrates how to control the network and thus enables future creation of specific regression test scenarios or other scope extensions.
Discussion points
No response
Dependencies & Related Tasks
No response
Checklist