diff --git a/app/container_manager/container_manager.py b/app/container_manager/container_manager.py index 5b26a72a..cc3be8b7 100644 --- a/app/container_manager/container_manager.py +++ b/app/container_manager/container_manager.py @@ -45,7 +45,7 @@ async def create_container( def destroy(self, container: Container) -> None: if self.is_running(container): container.kill() - container.remove() + container.remove(force=True) def get_container(self, id_or_name: str) -> Optional[Container]: try: diff --git a/test_collections/matter/sdk_tests/support/chip/chip_server.py b/test_collections/matter/sdk_tests/support/chip/chip_server.py index bd27147b..7c8082a8 100644 --- a/test_collections/matter/sdk_tests/support/chip/chip_server.py +++ b/test_collections/matter/sdk_tests/support/chip/chip_server.py @@ -175,11 +175,19 @@ async def stop(self) -> None: if not self.__server_started: return - self.sdk_container.send_command( - f'-SIGTERM -f "{self.__server_full_command}"', prefix="pkill" - ) + try: + self.sdk_container.send_command( + f'-SIGTERM -f "{self.__server_full_command}"', prefix="pkill" + ) + self.__wait_for_server_exit() + except Exception as e: + # Issue: https://github.com/project-chip/certification-tool/issues/414 + self.logger.info( + "Could not get exit code after pkill command " + f"{self.__server_full_command}." + ) + self.logger.debug(str(e)) - self.__wait_for_server_exit() self.__server_started = False def trace_file_params(self, topic: str) -> str: