Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def setUpServerLogging(self, is_llgs):
]

def get_next_port(self):
return 12000 + random.randint(0, 3999)
return 12000 + random.randint(0, 7999)

def reset_test_sequence(self):
self.test_sequence = GdbRemoteTestSequence(self.logger)
Expand Down Expand Up @@ -388,7 +388,8 @@ def connect_to_debug_monitor(self, attach_pid=None):
# We're using a random port algorithm to try not to collide with other ports,
# and retry a max # times.
attempts = 0
MAX_ATTEMPTS = 20
MAX_ATTEMPTS = 16
attempt_wait = 3

while attempts < MAX_ATTEMPTS:
server = self.launch_debug_monitor(attach_pid=attach_pid)
Expand Down Expand Up @@ -424,7 +425,8 @@ def connect_to_debug_monitor(self, attach_pid=None):

# And wait a random length of time before next attempt, to avoid
# collisions.
time.sleep(random.randint(1, 5))
time.sleep(attempt_wait)
attempt_wait *= 1.2

# Now grab a new port number.
self.port = self.get_next_port()
Expand Down