소스 검색

tests: cleanup properly in wait_on_fail decorator

Close transport used to wait for user input, otherwise all further tests
would fail on cleanup (FD leak detected). This in practice is only
useful when using wait_on_fail decorator without --failfast option.
Marek Marczykowski-Górecki 4 년 전
부모
커밋
e38265501c
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      qubes/tests/__init__.py

+ 1 - 0
qubes/tests/__init__.py

@@ -251,6 +251,7 @@ def wait_on_fail(func):
                     lambda: asyncio.StreamReaderProtocol(reader),
                     sys.stdin))
             self.loop.run_until_complete(reader.readline())
+            transport.close()
             raise
 
     return wrapper