diff options
author | David Storch <david.storch@mongodb.com> | 2021-10-01 13:24:06 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-10-01 14:08:31 +0000 |
commit | fe4cf6134b16f102591053d6f4fe11e5cc0eb3ec (patch) | |
tree | 559991d99827a8b3252e2fdfb14b90a548de0793 /jstests/core | |
parent | 0950600446ee8030132bacc9c00eb4ebca411500 (diff) | |
download | mongo-fe4cf6134b16f102591053d6f4fe11e5cc0eb3ec.tar.gz |
SERVER-58210 Eliminate unnecessary RPC protocol negotiation code
Diffstat (limited to 'jstests/core')
-rw-r--r-- | jstests/core/profile_agg.js | 6 | ||||
-rw-r--r-- | jstests/core/profile_count.js | 4 | ||||
-rw-r--r-- | jstests/core/profile_distinct.js | 4 | ||||
-rw-r--r-- | jstests/core/profile_find.js | 4 | ||||
-rw-r--r-- | jstests/core/profile_insert.js | 6 | ||||
-rw-r--r-- | jstests/core/profile_list_collections.js | 2 | ||||
-rw-r--r-- | jstests/core/profile_list_indexes.js | 2 | ||||
-rw-r--r-- | jstests/core/profile_mapreduce.js | 4 |
8 files changed, 14 insertions, 18 deletions
diff --git a/jstests/core/profile_agg.js b/jstests/core/profile_agg.js index 01d15c6bf9e..d6611fa98ab 100644 --- a/jstests/core/profile_agg.js +++ b/jstests/core/profile_agg.js @@ -8,7 +8,7 @@ (function() { "use strict"; -// For getLatestProfilerEntry and getProfilerProtocolStringForCommand +// For 'getLatestProfilerEntry()'. load("jstests/libs/profiler.js"); const testDB = db.getSiblingDB("profile_agg"); @@ -37,9 +37,7 @@ assert.eq(profileObj.nreturned, 8, tojson(profileObj)); assert.eq(profileObj.keysExamined, 8, tojson(profileObj)); assert.eq(profileObj.docsExamined, 8, tojson(profileObj)); assert.eq(profileObj.planSummary, "IXSCAN { a: 1 }", tojson(profileObj)); -assert.eq(profileObj.protocol, - getProfilerProtocolStringForCommand(testDB.getMongo()), - tojson(profileObj)); +assert.eq(profileObj.protocol, "op_msg", tojson(profileObj)); assert.eq(profileObj.command.aggregate, coll.getName(), tojson(profileObj)); assert.eq(profileObj.command.collation, {locale: "fr"}, tojson(profileObj)); assert.eq(profileObj.command.comment, "agg_comment", tojson(profileObj)); diff --git a/jstests/core/profile_count.js b/jstests/core/profile_count.js index d95ffae37c9..466f8bb6fc2 100644 --- a/jstests/core/profile_count.js +++ b/jstests/core/profile_count.js @@ -9,7 +9,7 @@ (function() { "use strict"; -// For getLatestProfilerEntry and getProfilerProtocolStringForCommand +// For 'getLatestProfilerEntry()'. load("jstests/libs/profiler.js"); var testDB = db.getSiblingDB("profile_count"); @@ -33,7 +33,7 @@ var profileObj = getLatestProfilerEntry(testDB); assert.eq(profileObj.ns, coll.getFullName(), tojson(profileObj)); assert.eq(profileObj.op, "command", tojson(profileObj)); -assert.eq(profileObj.protocol, getProfilerProtocolStringForCommand(conn), tojson(profileObj)); +assert.eq(profileObj.protocol, "op_msg", tojson(profileObj)); assert.eq(profileObj.command.count, coll.getName(), tojson(profileObj)); assert.eq(profileObj.command.collation, {locale: "fr"}, tojson(profileObj)); assert.eq(profileObj.planSummary, "RECORD_STORE_FAST_COUNT", tojson(profileObj)); diff --git a/jstests/core/profile_distinct.js b/jstests/core/profile_distinct.js index 2dab222c8b0..176f6b4c878 100644 --- a/jstests/core/profile_distinct.js +++ b/jstests/core/profile_distinct.js @@ -8,7 +8,7 @@ (function() { "use strict"; -// For getLatestProfilerEntry and getProfilerProtocolStringForCommand +// For 'getLatestProfilerEntry()'. load("jstests/libs/profiler.js"); var testDB = db.getSiblingDB("profile_distinct"); @@ -36,7 +36,7 @@ assert.eq(profileObj.keysExamined, 5, tojson(profileObj)); assert.eq(profileObj.docsExamined, 5, tojson(profileObj)); assert.eq(profileObj.planSummary, "IXSCAN { b: 1 }", tojson(profileObj)); assert(profileObj.execStats.hasOwnProperty("stage"), tojson(profileObj)); -assert.eq(profileObj.protocol, getProfilerProtocolStringForCommand(conn), tojson(profileObj)); +assert.eq(profileObj.protocol, "op_msg", tojson(profileObj)); assert.eq(coll.getName(), profileObj.command.distinct, tojson(profileObj)); assert.eq(profileObj.command.collation, {locale: "fr"}, tojson(profileObj)); assert(profileObj.hasOwnProperty("responseLength"), tojson(profileObj)); diff --git a/jstests/core/profile_find.js b/jstests/core/profile_find.js index a4d3676646c..05d9ee3a757 100644 --- a/jstests/core/profile_find.js +++ b/jstests/core/profile_find.js @@ -8,7 +8,7 @@ (function() { "use strict"; -// For getLatestProfilerEntry and getProfilerProtocolStringForCommand +// For 'getLatestProfilerEntry()'. load("jstests/libs/profiler.js"); var testDB = db.getSiblingDB("profile_find"); @@ -41,7 +41,7 @@ assert.eq(profileObj.planSummary, "IXSCAN { a: 1 }", profileObj); assert(profileObj.execStats.hasOwnProperty("stage"), profileObj); assert.eq(profileObj.command.filter, {a: 1}, profileObj); assert.eq(profileObj.command.limit, 1, profileObj); -assert.eq(profileObj.protocol, getProfilerProtocolStringForCommand(testDB.getMongo()), profileObj); +assert.eq(profileObj.protocol, "op_msg", profileObj); assert.eq(profileObj.command.collation, {locale: "fr"}); assert.eq(profileObj.cursorExhausted, true, profileObj); diff --git a/jstests/core/profile_insert.js b/jstests/core/profile_insert.js index 3f4200e29c2..8b18f83f8bb 100644 --- a/jstests/core/profile_insert.js +++ b/jstests/core/profile_insert.js @@ -9,7 +9,7 @@ (function() { "use strict"; -// For getLatestProfilerEntry and getProfilerProtocolStringForCommand +// For 'getLatestProfilerEntry()'. load("jstests/libs/profiler.js"); var testDB = db.getSiblingDB("profile_insert"); @@ -31,9 +31,7 @@ assert.eq(profileObj.op, "insert", tojson(profileObj)); assert.eq(profileObj.ninserted, 1, tojson(profileObj)); assert.eq(profileObj.keysInserted, 1, tojson(profileObj)); assert.eq(profileObj.command.ordered, true, tojson(profileObj)); -assert.eq(profileObj.protocol, - getProfilerProtocolStringForCommand(testDB.getMongo()), - tojson(profileObj)); +assert.eq(profileObj.protocol, "op_msg", tojson(profileObj)); assert(profileObj.hasOwnProperty("responseLength"), tojson(profileObj)); assert(profileObj.hasOwnProperty("numYield"), tojson(profileObj)); diff --git a/jstests/core/profile_list_collections.js b/jstests/core/profile_list_collections.js index 4703bdd531d..a242146eaff 100644 --- a/jstests/core/profile_list_collections.js +++ b/jstests/core/profile_list_collections.js @@ -9,7 +9,7 @@ (function() { "use strict"; -// For getLatestProfilerEntry and getProfilerProtocolStringForCommand. +// For 'getLatestProfilerEntry()'. load("jstests/libs/profiler.js"); var testDB = db.getSiblingDB("profile_list_collections"); diff --git a/jstests/core/profile_list_indexes.js b/jstests/core/profile_list_indexes.js index 76f46ce52a6..b876c788dc6 100644 --- a/jstests/core/profile_list_indexes.js +++ b/jstests/core/profile_list_indexes.js @@ -9,7 +9,7 @@ (function() { "use strict"; -// For getLatestProfilerEntry and getProfilerProtocolStringForCommand. +// For 'getLatestProfilerEntry()'. load("jstests/libs/profiler.js"); var testDB = db.getSiblingDB("profile_list_indexes"); diff --git a/jstests/core/profile_mapreduce.js b/jstests/core/profile_mapreduce.js index 608971f8684..c719ec8b47b 100644 --- a/jstests/core/profile_mapreduce.js +++ b/jstests/core/profile_mapreduce.js @@ -11,7 +11,7 @@ (function() { "use strict"; -// For getLatestProfilerEntry and getProfilerProtocolStringForCommand +// For 'getLatestProfilerEntry()'. load("jstests/libs/profiler.js"); const testDB = db.getSiblingDB("profile_mapreduce"); @@ -48,7 +48,7 @@ assert.eq(profileObj.op, "command", tojson(profileObj)); assert.eq(profileObj.keysExamined, 3, tojson(profileObj)); assert.eq(profileObj.docsExamined, 3, tojson(profileObj)); assert.eq(profileObj.planSummary, "IXSCAN { a: 1 }", tojson(profileObj)); -assert.eq(profileObj.protocol, getProfilerProtocolStringForCommand(conn), tojson(profileObj)); +assert.eq(profileObj.protocol, "op_msg", tojson(profileObj)); assert.eq(coll.getName(), profileObj.command.mapreduce, tojson(profileObj)); assert.eq({locale: "fr"}, profileObj.command.collation, tojson(profileObj)); assert(profileObj.hasOwnProperty("responseLength"), tojson(profileObj)); |