Skip to content

Commit 19e1161

Browse files
committed
Keep Jython 2.5 tests from running out of memory
1 parent c27f382 commit 19e1161

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.evergreen/run-tests.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ else
3131
fi
3232

3333
PYTHON_VERSION=$($PYTHON -c 'import sys; sys.stdout.write(str(sys.version_info[0]))')
34+
PLATFORM=$($PYTHON -c 'import platform, sys; sys.stdout.write(platform.system())')
3435

3536
if [ "$SSL" = "ssl" ]; then
3637
if [ "$PYTHON_VERSION" = "3" ]; then
@@ -59,11 +60,18 @@ else
5960
TEST_VERBOSITY="--verbosity=2"
6061
fi
6162

63+
if [ "$PLATFORM" = "Java" ]; then
64+
# Keep Jython 2.5 from running out of memory.
65+
EXTRA_ARGS="-J-XX:-UseGCOverheadLimit -J-Xmx4096m"
66+
else
67+
EXTRA_ARGS=""
68+
fi
69+
6270
echo "Running $AUTH tests over $SSL with python $PYTHON, connecting to $MONGODB_URI"
6371
$PYTHON -c 'import sys; print(sys.version)'
6472

6573
# Run the tests, and store the results in Evergreen compatible XUnit XML
6674
# files in the xunit-results/ directory.
6775

6876
$PYTHON setup.py clean
69-
$PYTHON setup.py $TEST_CMD $TEST_VERBOSITY
77+
$PYTHON $EXTRA_ARGS setup.py $TEST_CMD $TEST_VERBOSITY

0 commit comments

Comments
 (0)