Work around a windows specific problem in tests.

On Windows, delete-file-recursively sometimes fails
to delete certain jar files, which results in cascading
test failures.

An explicit call to System/gc seems to solve the problem
on Windows Vista.
This commit is contained in:
Matjaz Gregoric 2011-10-31 08:49:09 +01:00
parent b00c8cae90
commit 0d6dc8f521

View file

@ -51,6 +51,10 @@
(let [rel-repo-snaps-dep (assoc pr :dependencies [slamhound])]
(is (thrown? Exception (with-no-log (deps rel-repo-snaps-dep))))))
(finally
;; This gc call is a workaround for a windows specific problem
;; where jars fail to get deleted. An explicit call to gc seems
;; to solve the issue.
(System/gc)
(delete-file-recursively (:library-path sample-project) :silently))))
(def native-lib-files-map