projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '12125-workbench-project-trash' refs #12125
[arvados.git]
/
services
/
fuse
/
tests
/
test_exec.py
diff --git
a/services/fuse/tests/test_exec.py
b/services/fuse/tests/test_exec.py
index 66013a4bf2f8b4950e45e2adc98035b540374e8a..ab6e13136b02fc45331106441272ee2c2ba6f982 100644
(file)
--- a/
services/fuse/tests/test_exec.py
+++ b/
services/fuse/tests/test_exec.py
@@
-1,3
+1,7
@@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
import arvados_fuse.command
import json
import multiprocessing
import arvados_fuse.command
import json
import multiprocessing
@@
-6,6
+10,8
@@
import run_test_server
import tempfile
import unittest
import tempfile
import unittest
+from .integration_test import workerPool
+
try:
from shlex import quote
except:
try:
from shlex import quote
except:
@@
-40,16
+46,13
@@
class ExecMode(unittest.TestCase):
def setUp(self):
self.mnt = tempfile.mkdtemp()
_, self.okfile = tempfile.mkstemp()
def setUp(self):
self.mnt = tempfile.mkdtemp()
_, self.okfile = tempfile.mkstemp()
- self.pool = multiprocessing.Pool(1)
def tearDown(self):
def tearDown(self):
- self.pool.terminate()
- self.pool.join()
os.rmdir(self.mnt)
os.unlink(self.okfile)
def test_exec(self):
os.rmdir(self.mnt)
os.unlink(self.okfile)
def test_exec(self):
-
self.pool
.apply(try_exec, (self.mnt, [
+
workerPool()
.apply(try_exec, (self.mnt, [
'sh', '-c',
'echo -n foo >{}; cp {} {}'.format(
quote(os.path.join(self.mnt, 'zzz', 'foo.txt')),
'sh', '-c',
'echo -n foo >{}; cp {} {}'.format(
quote(os.path.join(self.mnt, 'zzz', 'foo.txt')),