Skip to content
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

Add a unit-test to test the overlay connection with mtSTART_PROTOCOL message #4861

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from

Conversation

gregtatcam
Copy link
Collaborator

@gregtatcam gregtatcam commented Jan 2, 2024

High Level Overview of Change

This is an extension of #3839 PR. It adds a pseudo-configurable parameters to Config class. These parameters are not configurable via ripple.cfg. The parameters facilitate setting up the overlay with virtual nodes in unit-tests. A unit-test is added to test the overlay connectivity with the added start protocol message for two peers where: 1) both peers use the protocol version 2.3; 2) one of the peers uses the protocol version 2.3 and another peer uses the protocol version 2.2.

Context of Change

Two parameters are added to Config class. ALLOW_OVERLAY parameter overwrites standalone mode behavior of disabling the overlay. It allows creation of the overlay between the configured fixed ip's of the virtual nodes within the unit-test. PROTOCOL_VERSIONS parameter simulates a peer with different protocol versions. This enables backward compatibility testing of the start protocol message. Peer's metrics is extended with two dictionaries: messge_type_sent and message_type_recv, which contain frequencies of message type for sent and received messages respectively. The added metrics enables testing of the protocol messages propagation.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

Test Plan

A new unit-test ProtocolStart is added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants