diff options
author | Mikhail Shchatko <mikhail.shchatko@mongodb.com> | 2020-12-04 10:42:50 +0300 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-12-08 07:43:26 +0000 |
commit | 7fb2d5929683c61462b10550a0dd69d23b951954 (patch) | |
tree | b991ad0764576322438925bf5d3f82d71ec74b92 /jstests/hooks | |
parent | 0aa1f24df337212f33b9aaa6e0e8d5204f44fa0e (diff) | |
download | mongo-7fb2d5929683c61462b10550a0dd69d23b951954.tar.gz |
SERVER-39859 Use the Evergreen REST v2 API to download -latest tarballs in setup multiversion mongodb
Diffstat (limited to 'jstests/hooks')
-rw-r--r-- | jstests/hooks/run_fuzzer_restore_settings.js | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/jstests/hooks/run_fuzzer_restore_settings.js b/jstests/hooks/run_fuzzer_restore_settings.js index a2858f4e915..3a8318ea2bd 100644 --- a/jstests/hooks/run_fuzzer_restore_settings.js +++ b/jstests/hooks/run_fuzzer_restore_settings.js @@ -1,15 +1,25 @@ (function() { 'use strict'; -assert.commandWorked(db.adminCommand({setParameter: 1, requireApiVersion: false, apiVersion: "1"})); +// Ignore "attempted to set unrecognized parameter" error from setParameter on old versions +let res; +try { + res = db.adminCommand({setParameter: 1, requireApiVersion: false, apiVersion: "1"}); +} catch (e) { + print("Failed to set requireApiVersion."); + print(e); +} +if (res && res.ok === 0 && !res.errmsg.includes("attempted to set unrecognized parameter")) { + assert.commandWorked(res); +} // Unsetting read/write settings. This command will also cause the server to refresh and get -// the new settings. A standalone or mongos will return an error; ignore it. +// the new settings. A standalone, mongos or old version will return an error; ignore it. const result = db.adminCommand({ setDefaultRWConcern: 1, defaultReadConcern: {}, defaultWriteConcern: {}, writeConcern: {w: 1} }); -assert.commandWorkedOrFailedWithCode(result, [51300, 51301]); +assert.commandWorkedOrFailedWithCode(result, [51300, 51301, 40415]); })(); |