Skip to content

Commit

Permalink
Execution test were failing on Python 3.12
Browse files Browse the repository at this point in the history
Due to change in behaviour of unix_socket.wait_closed
  • Loading branch information
olethanh committed Aug 29, 2024
1 parent 93d8804 commit c996f2c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/aleph/vm/hypervisors/firecracker/microvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,12 @@ async def teardown(self):
if self._unix_socket:
logger.debug("Closing unix socket")
self._unix_socket.close()
await self._unix_socket.wait_closed()
try:
await asyncio.wait_for(self._unix_socket.wait_closed(), 2)
except asyncio.TimeoutError:
# In Python < 3.11 wait_closed() was broken and returned immediatly
# It is supposedly fixed in python 3.12.1 but hang indefinelty during the tests.
logger.info("f{self} unix socket closing timout")

logger.debug("Removing files")
if self.config_file_path:
Expand Down

0 comments on commit c996f2c

Please sign in to comment.