Election: add unit tests for core algorithm #5898
Labels
Focus:Gossip Protocol
Tasks related to fundamental gossip algorithm behavior
Focus:Supervisor
Related to the Habitat Supervisor (core/hab-sup) component
Stale
Type:Stability
Milestone
Exhaustive testing using end-to-end or integration tests is time and resource intensive. However, the core elections algorithm is contained in just a handful of functions:
start_election
instert_election
restart_elections
merge
Creating testable, purely functional interfaces (as with
elections_to_restart_impl
) can allow for the creation of efficient tests of a wide variety of scenarios to help validate the algorithm in a variety of scenarios that are hard to achieve with other types of testing.The text was updated successfully, but these errors were encountered: