Reduce chance of disconnected components in random graph test #1672
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This
test_nodemapper_isolated_nodes
test creates a graph with 5 nodes (0, 1, 2, 3, 4) being connected by 20 edges and a single isolated node (5). The test checks that the graph has 2 connected components, that is, the first 5 nodes are connected and the last node is separate. With only 20 edges, this fails very occasionally, because the randomness will sometimes miss a node or have separate clumps.This PR ups the number of edges to 1000 to exponentially reduce the chance of the graph having more than 2 connected components.
See: #1569