diff options
author | Sara Golemon <sara.golemon@mongodb.com> | 2020-03-25 22:22:50 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-03-27 13:39:37 +0000 |
commit | f073760f51d4836a8669b1943c27fd8f4d8e7cc8 (patch) | |
tree | 6a87fbe6deb8881220d869f118ab71ee8dc11714 /jstests/noPassthrough/http_client_keep_alive.js | |
parent | ef3e188790cb5ba3ecc86ede5df79af33565b33a (diff) | |
download | mongo-f073760f51d4836a8669b1943c27fd8f4d8e7cc8.tar.gz |
SERVER-47133 Refactor HttpClient to allow returning on error
Diffstat (limited to 'jstests/noPassthrough/http_client_keep_alive.js')
-rw-r--r-- | jstests/noPassthrough/http_client_keep_alive.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/jstests/noPassthrough/http_client_keep_alive.js b/jstests/noPassthrough/http_client_keep_alive.js index 689231dbe03..6af354aa7a9 100644 --- a/jstests/noPassthrough/http_client_keep_alive.js +++ b/jstests/noPassthrough/http_client_keep_alive.js @@ -49,6 +49,11 @@ function runTest(mongod, web) { admin.runCommand({httpClientRequest: 1, uri: web.getURL() + '/connect_count'}); const connects = assert.commandWorked(connectsCmd).body; assert.eq(connects, 2, "Connection count incorrect."); + + // Check 404 returns failure. + const failedCmd = assert.commandWorked( + admin.runCommand({httpClientRequest: 1, uri: web.getURL() + '/no_such_path'})); + assert.eq(failedCmd.code, 404); } const web = new ConfigExpandRestServer(); |