summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/socket_disconnect_kills.js
diff options
context:
space:
mode:
authorJason Carey <jcarey@argv.me>2019-01-03 16:38:26 -0500
committerJason Carey <jcarey@argv.me>2019-02-10 12:23:19 -0500
commit21b5477520744ca02e1574160caa31e0633849dd (patch)
tree36f351a91a195a633c9cc495f6249057497249ff /jstests/noPassthrough/socket_disconnect_kills.js
parentc922cb18516981ceca59993331296d102f4e01fb (diff)
downloadmongo-21b5477520744ca02e1574160caa31e0633849dd.tar.gz
SERVER-39183 honor socket disconnect in $where
Diffstat (limited to 'jstests/noPassthrough/socket_disconnect_kills.js')
-rw-r--r--jstests/noPassthrough/socket_disconnect_kills.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/jstests/noPassthrough/socket_disconnect_kills.js b/jstests/noPassthrough/socket_disconnect_kills.js
index 1062296ff29..a1ba2e26e60 100644
--- a/jstests/noPassthrough/socket_disconnect_kills.js
+++ b/jstests/noPassthrough/socket_disconnect_kills.js
@@ -134,6 +134,29 @@
[[checkClosedEarly, runCommand({find: "test", filter: {}})],
[
checkClosedEarly,
+ runCommand({
+ find: "test",
+ filter: {
+ $where: function() {
+ sleep(100000);
+ }
+ }
+ })
+ ],
+ [
+ checkClosedEarly,
+ runCommand({
+ find: "test",
+ filter: {
+ $where: function() {
+ while (true) {
+ }
+ }
+ }
+ })
+ ],
+ [
+ checkClosedEarly,
function(client) {
client.forceReadMode("legacy");
assert(client.getDB(testName).test.findOne({}));