Skip to content

initial set of netsim tests #657

@rkuhn

Description

@rkuhn

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

  • I understand that feature requests and unrefined work item should be open as GitHub Discussions instead.
  • I have assigned this item to an existing milestone from the roadmap
  • I have added a label capturing the impact of this item (i.e. value for users/stakeholders if successful)
  • I have added a label capturing the delivery risk of this item (i.e. how likely is it that this task will succeed as planned)
  • I have added a label capturing the effort of this item (i.e. how large is the task?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Task.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions