[gvfs/wip/oholy/test-timeouts] test: Add timeouts
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/wip/oholy/test-timeouts] test: Add timeouts
- Date: Wed, 23 Mar 2022 09:01:14 +0000 (UTC)
commit 60fe2a553c92a99621990e3db08d0c65e8b81c8d
Author: Ondrej Holy <oholy redhat com>
Date: Wed Mar 23 09:46:07 2022 +0100
test: Add timeouts
test/gvfs-test | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/test/gvfs-test b/test/gvfs-test
index 8beb7266..a3f1855e 100755
--- a/test/gvfs-test
+++ b/test/gvfs-test
@@ -128,7 +128,11 @@ class GvfsTestCase(unittest.TestCase):
prog = subprocess.Popen(argv, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, universal_newlines=True)
- (out, err) = prog.communicate()
+ try:
+ (out, err) = prog.communicate(timeout=30)
+ except subprocess.TimeoutExpired:
+ proc.kill()
+
return (prog.returncode, out, err)
def program_out_err(self, argv):
@@ -510,7 +514,7 @@ Subsystem sftp %(sftp_server)s
# mount it
uri = 'sftp://localhost:22222'
- subprocess.check_call(['gio', 'mount', uri])
+ subprocess.check_call(['gio', 'mount', uri], timeout=30)
self.do_mount_check(uri)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]