summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jstests/libs/python.js12
-rw-r--r--jstests/noPassthrough/configExpand_exec_timeeout.js2
2 files changed, 12 insertions, 2 deletions
diff --git a/jstests/libs/python.js b/jstests/libs/python.js
index 91a54252966..f046d4df30c 100644
--- a/jstests/libs/python.js
+++ b/jstests/libs/python.js
@@ -14,6 +14,14 @@ function getPython3Binary() {
}
}
- assert(fileExists(cmd), "Python3 interpreter not found");
- return cmd;
+ if (fileExists(cmd)) {
+ return cmd;
+ }
+
+ clearRawMongoProgramOutput();
+ assert.eq(runNonMongoProgram("python", "--version"), 0);
+ const pythonVersion = rawMongoProgramOutput();
+ assert(/Python 3/.exec(pythonVersion));
+
+ return "python";
}
diff --git a/jstests/noPassthrough/configExpand_exec_timeeout.js b/jstests/noPassthrough/configExpand_exec_timeeout.js
index 7434790fc3f..1a20d6fbc63 100644
--- a/jstests/noPassthrough/configExpand_exec_timeeout.js
+++ b/jstests/noPassthrough/configExpand_exec_timeeout.js
@@ -5,6 +5,8 @@
load('jstests/noPassthrough/libs/configExpand/lib.js');
+ assert.eq(runNonMongoProgram.apply(null, makeReflectionCmd('12345', {sleep: 0}).split(" ")), 0);
+
// Sleep 10 seconds during request.
configExpandSuccess({
setParameter: {