Skip to content

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

Merged
davecgh merged 2 commits intodecred:masterfrom
davecgh:connmgr_test_accuracy
Apr 11, 2026
Merged

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

Conversation

@davecgh
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 davecgh force-pushed the connmgr_test_accuracy branch from 113474d to acfafa2 Compare March 17, 2026 06:12
@davecgh davecgh force-pushed the connmgr_test_accuracy branch from acfafa2 to 531a968 Compare April 7, 2026 04:20
davecgh added 2 commits April 11, 2026 00:16
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 531a968 to 6a531a1 Compare April 11, 2026 05:16
@davecgh davecgh merged commit 6a531a1 into decred:master Apr 11, 2026
32 checks passed
@davecgh davecgh deleted the connmgr_test_accuracy branch April 11, 2026 05:19
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