Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Flush messages from mock gossip in IPAM test #1024

Merged
merged 5 commits into from
Jun 26, 2015
Merged

Flush messages from mock gossip in IPAM test #1024

merged 5 commits into from
Jun 26, 2015

Conversation

bboreham
Copy link
Contributor

(replaces #1017, branched against 1.0 this time)

Refactored mock router, and added a flush() function which we then call every time gossip messages are generated in TestTransfer(), thus avoiding the problem that they may be dropped if the previous message has not been removed from the channel, or may not have arrived by the time we check what has happened.

flush() is not called in the other two tests that use the mock router; one of them hardly does anything, and the other benefits from the message-dropping behaviour, in that it makes it also a test of recovery from network issues.

Fixes #982.

Also replaced a Sleep with the flush, so the unit tests run faster.

@rade rade added this to the 1.0.2 milestone Jun 26, 2015
rade added a commit that referenced this pull request Jun 26, 2015
Flush messages from mock gossip in IPAM test

Fixes #982.
@rade rade merged commit ec62029 into 1.0 Jun 26, 2015
@rade rade deleted the 982-fix-mock-gossip3 branch June 26, 2015 14:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants