Skip to content

Initial Connect: Add unit tests to validate the initial connect state machine with respect to skipping various parts#14036

Merged
DonLakeFlyer merged 1 commit intomasterfrom
initial-connect-matrix-test-doc
Feb 26, 2026
Merged

Initial Connect: Add unit tests to validate the initial connect state machine with respect to skipping various parts#14036
DonLakeFlyer merged 1 commit intomasterfrom
initial-connect-matrix-test-doc

Conversation

@DonLakeFlyer
Copy link
Copy Markdown
Collaborator

@DonLakeFlyer DonLakeFlyer commented Feb 26, 2026

Summary

Add a data-driven unit test that validates InitialConnectStateMachine skip behavior across all combinations of HighLatency, LogReplay, and Flying link flags. The test generates an 8-row matrix (3 boolean dimensions) and asserts which MAVLink request traffic occurs for each combination:

  • AUTOPILOT_VERSION: skipped when highLatency || logReplay
  • AVAILABLE_MODES: always requested
  • PARAM_REQUEST_LIST: always runs, but short-circuited internally for HL/LR links
  • MISSION_REQUEST_LIST (mission/geofence/rally): skipped when highLatency || logReplay

Note that 'flying' is not yet used. Working on that...

Also adds an analysis document covering the full initial connect pipeline: state ordering, retry/timeout behavior, skip predicates, progress weighting, and data captured at each stage.

Related to #13861

Test plan

  • InitialConnectTest::_stateRunMatrix passes locally across all 8 matrix rows
  • Existing InitialConnectTest cases continue to pass

Copilot AI review requested due to automatic review settings February 26, 2026 19:30
@DonLakeFlyer DonLakeFlyer changed the title Add initial-connect matrix expectations and readable table Initial Connect: Add unit tests to validate the initial connect state machine with respect to skipping various parts Feb 26, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds explicit matrix expectations and comprehensive documentation for the InitialConnectStateMachine behavior across different link types (high-latency, log-replay) and flight states.

Changes:

  • Added data-driven test _stateRunMatrix that validates all 8 combinations of (HighLatency, LogReplay, Flying) states
  • Added readable matrix tables showing expected request behavior in test comments
  • Added comprehensive 374-line analysis document covering InitialConnectStateMachine behavior, skip predicates, and state transitions

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
test/Vehicle/InitialConnectTest.h Added test method declarations for new matrix test
test/Vehicle/InitialConnectTest.cc Implemented comprehensive matrix test with 8 data-driven test cases validating AUTOPILOT_VERSION, AVAILABLE_MODES, and plan request behavior across different link configurations
docs/en/initial-connect-state-machine-analysis.md New comprehensive documentation covering state machine behavior, skip predicates, timeouts, progress tracking, and includes matching matrix tables

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 26, 2026

Build Results

Platform Status

Platform Status Details
Linux Passed View
Windows Failed View
MacOS Passed View
Android Failed View

Some builds failed.

Pre-commit

Check Status Details
pre-commit Failed (non-blocking) View

Pre-commit hooks: 32 passed, 78 failed, 10 skipped.

Test Results

linux-sanitizers: 51 passed, 0 skipped

linux_gcc_64: 51 passed, 0 skipped

Total: 102 passed, 0 skipped

Code Coverage

Coverage: N/A

No baseline available for comparison

Artifact Sizes

Artifact Size
QGroundControl 318.76 MB
QGroundControl-aarch64 195.76 MB
QGroundControl-x86_64 178.55 MB

No baseline available for comparison


Updated: 2026-02-26 20:34:24 UTC • Triggered by: MacOS

@DonLakeFlyer DonLakeFlyer merged commit 7b287dd into master Feb 26, 2026
47 of 55 checks passed
@DonLakeFlyer DonLakeFlyer deleted the initial-connect-matrix-test-doc branch February 26, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants