diff options
author | Ruoxin Xu <ruoxin.xu@mongodb.com> | 2020-09-09 18:32:18 +0100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-09-11 16:14:54 +0000 |
commit | 1373280c254a39d2ca7d85563718a6f74c927216 (patch) | |
tree | 939186f892cb5510f574ff03ee3ac7ef7908f97a | |
parent | 642adc7547023ec17f9c912e631790fa508c9818 (diff) | |
download | mongo-1373280c254a39d2ca7d85563718a6f74c927216.tar.gz |
SERVER-43503 Complete TODO listed in SERVER-32565
-rw-r--r-- | jstests/noPassthrough/max_time_ms.js | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/jstests/noPassthrough/max_time_ms.js b/jstests/noPassthrough/max_time_ms.js index 851be0637d6..ac04fd45d46 100644 --- a/jstests/noPassthrough/max_time_ms.js +++ b/jstests/noPassthrough/max_time_ms.js @@ -42,11 +42,7 @@ function executeTest(db, isMongos) { error = assert.throws(function() { cursor.itcount(); }, [], "expected query to abort due to time limit"); - // TODO SERVER-32565: The error should always be MaxTimeMSExpired, but there are rare cases - // where interrupting javascript execution on the server with a stepdown or timeout results - // in an error code of InternalError or Interrupted instead, so we also accept those here. - assert.commandFailedWithCode( - error, [ErrorCodes.MaxTimeMSExpired, ErrorCodes.Interrupted, ErrorCodes.InternalError]); + assert.commandFailedWithCode(error, ErrorCodes.MaxTimeMSExpired); })(); // @@ -102,11 +98,7 @@ function executeTest(db, isMongos) { cursor.next(); cursor.next(); }, [], "expected batch 2 (getmore) to abort due to time limit"); - // TODO SERVER-32565: The error should always be MaxTimeMSExpired, but there are rare cases - // where interrupting javascript execution on the server with a stepdown or timeout results - // in an error code of InternalError or Interrupted instead, so we also accept those here. - assert.commandFailedWithCode( - error, [ErrorCodes.MaxTimeMSExpired, ErrorCodes.Interrupted, ErrorCodes.InternalError]); + assert.commandFailedWithCode(error, ErrorCodes.MaxTimeMSExpired); })(); // @@ -168,11 +160,7 @@ function executeTest(db, isMongos) { error = assert.throws(function() { cursor.itcount(); }, [], "expected find() to abort due to time limit"); - // TODO SERVER-32565: The error should always be MaxTimeMSExpired, but there are rare cases - // where interrupting javascript execution on the server with a stepdown or timeout results - // in an error code of InternalError or Interrupted instead, so we also accept those here. - assert.commandFailedWithCode( - error, [ErrorCodes.MaxTimeMSExpired, ErrorCodes.Interrupted, ErrorCodes.InternalError]); + assert.commandFailedWithCode(error, ErrorCodes.MaxTimeMSExpired); })(); // |