Skip to content

Commit

Permalink
fix: Revert pytest update breaking e2e testing (#7014)
Browse files Browse the repository at this point in the history
  • Loading branch information
mildaniel authored May 2, 2024
1 parent c34659c commit 232f88a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ types-requests==2.31.0.6
types-urllib3==1.26.25.14

# Test requirements
pytest~=8.2.0

# Bumping pytest to >= 8.2.0 results in E2E test no starting up on python3.8
pytest==8.1.1

parameterized==0.9.0
pytest-xdist==3.6.1
pytest-forked==1.6.0
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/local/common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def wait_for_local_process(process, port, collect_output=False) -> str:
LOG.info(f"{line_as_str}")
if collect_output:
output += f"{line_as_str}\n"
if "Address already in use" in line_as_str:
if "Address already in use" in line_as_str or "port is already allocated" in line_as_str:
LOG.info(f"Attempted to start port on {port} but it is already in use, restarting on a new port.")
raise InvalidAddressException()
if "Press CTRL+C to quit" in line_as_str or "Error: " in line_as_str:
Expand Down
6 changes: 6 additions & 0 deletions tests/integration/local/start_lambda/test_start_lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,12 @@ def count_running_containers(self):
running_containers += 1
return running_containers

def tearDown(self) -> None:
# Use a new container test UUID for the next test run to avoid
# counting additional containers in the event of a retry
self.mode_env_variable = str(uuid.uuid4())
super().tearDown()


@parameterized_class(
("template_path",),
Expand Down

0 comments on commit 232f88a

Please sign in to comment.