There was an overflow in ShardPortIterator, leading the driver sometimes to dial from source ports outside of range specified in routing.go by minPort and maxPort, trying dialing from reserved ports. Also this overflow can make the driver pick a source port that doesn't correspond to the queried shard.
This PR removes this overflow, and adds a test checking for correct behavior of ShardPortIterator.
There was an overflow in ShardPortIterator, leading the driver sometimes to dial from source ports outside of range specified in routing.go by minPort and maxPort, trying dialing from reserved ports. Also this overflow can make the driver pick a source port that doesn't correspond to the queried shard.
This PR removes this overflow, and adds a test checking for correct behavior of ShardPortIterator.