projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '21659-gh-workflow-tests' into main. Closes #21659
[arvados.git]
/
sdk
/
python
/
tests
/
test_cache.py
diff --git
a/sdk/python/tests/test_cache.py
b/sdk/python/tests/test_cache.py
index 1c00551e5ce0e0daa764561d33e126f76b43b677..259acd0a3079bdeba319c46e931617c15b9b8af4 100644
(file)
--- a/
sdk/python/tests/test_cache.py
+++ b/
sdk/python/tests/test_cache.py
@@
-1,3
+1,7
@@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
from __future__ import print_function
from __future__ import absolute_import
from __future__ import print_function
from __future__ import absolute_import
@@
-34,15
+38,16
@@
class CacheTestThread(threading.Thread):
for x in range(16):
try:
data_in = _random(128)
for x in range(16):
try:
data_in = _random(128)
- data_in = hashlib.md5(data_in).hexdigest()
+ bytes("\n") + bytes(data_in)
+ data_in = hashlib.md5(data_in).hexdigest()
.encode() + b"\n" + data_in
c.set(url, data_in)
data_out = c.get(url)
c.set(url, data_in)
data_out = c.get(url)
- digest, _, content = data_out.partition("\n")
- if digest != hashlib.md5(content).hexdigest():
+ digest, _, content = data_out.partition(
b
"\n")
+ if digest != hashlib.md5(content).hexdigest()
.encode()
:
self.ok = False
except Exception as err:
self.ok = False
self.ok = False
except Exception as err:
self.ok = False
- print("cache failed: {}".format(err), file=sys.stderr)
+ print("cache failed: {}: {}".format(type(err), err), file=sys.stderr)
+ raise
class CacheTest(unittest.TestCase):
class CacheTest(unittest.TestCase):