fix(tests): Don't return the same port from PortPicker.get_available_port twice (#1083)

This commit is contained in:
Roy Jacobson 2023-04-13 09:56:46 +03:00 committed by GitHub
parent 70cf436c05
commit fc66dbb2cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -150,7 +150,8 @@ class PortPicker():
def get_available_port(self):
while not self.is_port_available(self.next_port):
self.next_port += 1
return self.next_port
self.next_port += 1
return self.next_port - 1
def is_port_available(self, port):
import socket