summaryrefslogtreecommitdiff
path: root/.unittests
diff options
context:
space:
mode:
authorDarrell Bishop <darrell@swiftstack.com>2013-06-26 22:47:49 -0700
committerDarrell Bishop <darrell@swiftstack.com>2013-07-28 22:08:17 -0700
commit9198e95468b3005730c931da1701f34b1a9ce2d9 (patch)
treed6034f1a489b67273c19dc43221b142bd0c7bb65 /.unittests
parent5d9c6f845cc98da720fea7e2343fdbb0db9a42a5 (diff)
downloadpython-swiftclient-9198e95468b3005730c931da1701f34b1a9ce2d9.tar.gz
Move multi-threading code to a library.
This patch extracts the multi-threading code from bin/swift into swiftclient/multithreading and adds tests. In particular, this new way of doing it (with context managers) will prevent non-daemonic threads from wedging the process when unexpected exceptions happen. I enabled reporting of which lines, specifically, are not covered by unit tests (added -m option to "coverage report" in .unittests). This patch includes a drive-by fix for uploading a segmented file with --use-slo when that object already exists. A key of "name" was used instead of "path", raising KeyError. There's also another drive-by fix for uploading segmented objects with --use-slo. Commit 874e0e4427b80e1b15b74a1557b73ba9d61443ca regressed this by removing the capturing of thread-worker results in QueueFunctionThread.run(). This patch restores that functionality and the feature (uploading SLO objects). Change-Id: I0b4f677e4a734e83d1a25088d9a74f7d46384e53
Diffstat (limited to '.unittests')
-rwxr-xr-x.unittests2
1 files changed, 1 insertions, 1 deletions
diff --git a/.unittests b/.unittests
index 4758296..bf5b027 100755
--- a/.unittests
+++ b/.unittests
@@ -3,6 +3,6 @@ set -e
python setup.py testr --coverage
RET=$?
-coverage report
+coverage report -m
rm -f .coverage
exit $RET