Increase open files limit during tests

Mozilla file functions (OS.File.move()/copy(),
NetUtil.asyncFetch/asyncCopy()) can leave file descriptors open for a
few seconds (even with an explicit inputStream.close() in the case of
the latter), so a source installation that copies ~500 translators and
styles (with fds for source and target) can exceed the default 1024
limit.
This commit is contained in:
Dan Stillman 2016-01-26 04:37:01 -05:00
parent aff8e35a0e
commit 3ac4203a75

View file

@ -82,6 +82,14 @@ else
TESTS="$(join , "${ARGS[@]}")"
fi
# Increase open files limit
#
# Mozilla file functions (OS.File.move()/copy(), NetUtil.asyncFetch/asyncCopy()) can leave file
# descriptors open for a few seconds (even with an explicit inputStream.close() in the case of
# the latter), so a source installation that copies ~500 translators and styles (with fds for
# source and target) can exceed the default 1024 limit.
ulimit -n 5000
# Set up profile directory
PROFILE="`mktemp -d 2>/dev/null || mktemp -d -t 'zotero-unit'`"
mkdir "$PROFILE/extensions"