test_gossip_node: Use random port (#31490)
Using a fixed port could cause a false negative, if the port is currently in use. We actually see this test failing regularly with an error that port `1111` is already in use. Quick search did not show any tests that hardcode port 1111, so it is unclear why is this happening. But using hardcoded ports is not a good practice anyways.
This commit is contained in:
parent
b19cc03c9a
commit
2d090d4547
|
@ -3236,7 +3236,7 @@ mod tests {
|
|||
));
|
||||
let (node, _, _) = ClusterInfo::gossip_node(
|
||||
solana_sdk::pubkey::new_rand(),
|
||||
&"1.1.1.1:1111".parse().unwrap(),
|
||||
&"1.1.1.1:0".parse().unwrap(),
|
||||
0,
|
||||
);
|
||||
assert!(ClusterInfo::is_spy_node(
|
||||
|
|
Loading…
Reference in New Issue