[ARVADOS] updated: 2.1.0-1676-gee12db851
Git user
git at public.arvados.org
Fri Nov 26 15:57:29 UTC 2021
Summary of changes:
sdk/python/tests/test_arv_put.py | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
via ee12db851d6e7933b6dbfda90e3cab8ccac7c896 (commit)
from 087fe7a4f739949cbc687508f4eeb7611c5083fa (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit ee12db851d6e7933b6dbfda90e3cab8ccac7c896
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date: Fri Nov 26 12:56:32 2021 -0300
18480: Improves test by confirming that symlinked dirs aren't affected.
Also, terminate the producer process before doing any assertion to avoid
test's lockups.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>
diff --git a/sdk/python/tests/test_arv_put.py b/sdk/python/tests/test_arv_put.py
index 3a24e8086..0e531dee3 100644
--- a/sdk/python/tests/test_arv_put.py
+++ b/sdk/python/tests/test_arv_put.py
@@ -293,22 +293,25 @@ class ArvPutUploadJobTest(run_test_server.TestCaseWithServers,
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'
- 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()
- cwriter = arv_put.ArvPutUploadJob([self.tempdir])
+ cwriter = arv_put.ArvPutUploadJob([self.tempdir_with_symlink])
cwriter.start(save_collection=False)
- self.assertNotIn(fifo_filename, cwriter.manifest_text())
if producer.exitcode is None:
- # If the producer is still running, kill it.
+ # 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.assertTrue(os.path.islink(os.path.join(self.tempdir_with_symlink, 'linkeddir')))
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list