add more tests for ports selecting