Skip to content

Commit

Permalink
reuse existing ports for test (#17856)
Browse files Browse the repository at this point in the history
  • Loading branch information
colesnodgrass authored Oct 11, 2022
1 parent 30d7523 commit bd54de0
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ public void testInitKubePortManagerSingletonTwice() throws Exception {
KubePortManagerSingleton originalKubePortManager = KubePortManagerSingleton.getInstance();

// init the second time with the same ports
final List<Integer> theSameOpenPorts = new ArrayList<>(getOpenPorts(30));
KubePortManagerSingleton.init(new HashSet<>(theSameOpenPorts.subList(1, theSameOpenPorts.size() - 1)));
KubePortManagerSingleton.init(new HashSet<>(openPorts.subList(1, openPorts.size() - 1)));
assertEquals(originalKubePortManager, KubePortManagerSingleton.getInstance());

// init the second time with different ports
Expand Down

0 comments on commit bd54de0

Please sign in to comment.