Skip to content

connmgr: Improve accuracy of a couple of tests.#3642

Open
davecgh wants to merge 2 commits intodecred:masterfrom
davecgh:connmgr_test_accuracy
Open

connmgr: Improve accuracy of a couple of tests.#3642
davecgh wants to merge 2 commits intodecred:masterfrom
davecgh:connmgr_test_accuracy

Conversation

@davecgh
Copy link
Member

@davecgh davecgh commented Mar 8, 2026

This consists of two commits which improve the accuracy of a couple of tests.

The first commit makes TestPassAddrAlongDialAddr more accurate by explicitly detecting the dailed address directly in the provided dialer as opposed to from the conn request object of the mock connection.

An invalid address, such as the one that is used in the test, would never result in a valid connection.

The second commit reworks the TestTargetOutbound test a bit to ensure it fails if the expected number of connections are not made within a certain timeout. The prevents a test timeout in the failure case.

@davecgh davecgh added this to the 2.2.0 milestone Mar 8, 2026
Copy link
Member

@jholdstock jholdstock left a comment

Choose a reason for hiding this comment

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

File copyright year is not updated, otherwise lgtm

@davecgh davecgh force-pushed the connmgr_test_accuracy branch from 358fdee to 113474d Compare March 11, 2026 08:58
@davecgh
Copy link
Member Author

davecgh commented Mar 11, 2026

File copyright year is not updated, otherwise lgtm

Thanks. I rebased it over master where it was already updated. It should be good to go now.

davecgh added 2 commits March 17, 2026 01:11
This makes TestPassAddrAlongDialAddr more accurate by explicitly
detecting the dailed address directly in the provided dialer as opposed
to from the conn request object of the mock connection.

An invalid address, such as the one that is used in the test, would
never result in a valid connection.
This reworks the TestTargetOutbound test a bit to ensure it fails
if the expected number of connections are not made within a certain
timeout.  The prevents a test timeout in the failure case.
@davecgh davecgh force-pushed the connmgr_test_accuracy branch from 113474d to acfafa2 Compare March 17, 2026 06:12
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.

2 participants