projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
18858: Fixes user fixture: usernames can only be alphanums.
[arvados.git]
/
sdk
/
python
/
tests
/
test_arv_put.py
diff --git
a/sdk/python/tests/test_arv_put.py
b/sdk/python/tests/test_arv_put.py
index 5ed356ff9e27c1d4adae103af5c8970425c7208e..0e531dee314529534aa4b5ae14815756105f0e66 100644
(file)
--- a/
sdk/python/tests/test_arv_put.py
+++ b/
sdk/python/tests/test_arv_put.py
@@
-293,18
+293,24
@@
class ArvPutUploadJobTest(run_test_server.TestCaseWithServers,
shutil.rmtree(self.small_files_dir)
shutil.rmtree(self.tempdir_with_symlink)
shutil.rmtree(self.small_files_dir)
shutil.rmtree(self.tempdir_with_symlink)
- def test_non_regular_files_are_ignored(self):
+ def test_non_regular_files_are_ignored
_except_symlinks_to_dirs
(self):
def pfunc(x):
with open(x, 'w') as f:
f.write('test')
fifo_filename = 'fifo-file'
def pfunc(x):
with open(x, 'w') as f:
f.write('test')
fifo_filename = 'fifo-file'
- fifo_path = os.path.join(self.tempdir, fifo_filename)
+ fifo_path = os.path.join(self.tempdir_with_symlink, fifo_filename)
+ self.assertTrue(os.path.islink(os.path.join(self.tempdir_with_symlink, 'linkeddir')))
os.mkfifo(fifo_path)
producer = multiprocessing.Process(target=pfunc, args=(fifo_path,))
producer.start()
os.mkfifo(fifo_path)
producer = multiprocessing.Process(target=pfunc, args=(fifo_path,))
producer.start()
- cwriter = arv_put.ArvPutUploadJob([self.tempdir])
+ cwriter = arv_put.ArvPutUploadJob([self.tempdir
_with_symlink
])
cwriter.start(save_collection=False)
cwriter.start(save_collection=False)
- producer.join()
+ if producer.exitcode is None:
+ # If the producer is still running, kill it. This should always be
+ # before any assertion that may fail.
+ producer.terminate()
+ producer.join(1)
+ self.assertIn('linkeddir', cwriter.manifest_text())
self.assertNotIn(fifo_filename, cwriter.manifest_text())
def test_symlinks_are_followed_by_default(self):
self.assertNotIn(fifo_filename, cwriter.manifest_text())
def test_symlinks_are_followed_by_default(self):