More test massaging for MongoDB server 5.x

This commit is contained in:
Michael Klishin 2022-04-23 21:29:45 +04:00
parent 30cd472e23
commit b5fd0a2738
No known key found for this signature in database
GPG key ID: E80EDCFA0CDB21EE
2 changed files with 4 additions and 6 deletions

View file

@ -1 +1 @@
["^ ","~$admin-db",["^ ","~:row",259,"~:col",1,"~:fixed-arities",["~#set",[1]],"~:name","^0","~:ns","~$monger.core","~:top-ns","^7"],"~$get-db",["^ ","^1",117,"^2",1,"^3",["^4",[2]],"^5","^9","^6","^7","^8","^7","~:arities",["^ ","~i2",["^ ","~:args",["~#list",[null,"~:nilable/string"]]]]],"~$server-address",["^ ","^1",132,"^2",1,"^3",["^4",[1,2]],"^5","^>","^6","^7","^8","^7","^:",["^ ","~i1",["^ ","^;",["^<",["^="]]],"~i2",["^ ","^;",["^<",["^=","~:nilable/int"]]]]],"~$raw-command",["^ ","^1",293,"^2",1,"^3",["^4",[2]],"^5","^@","^6","^7","^8","^7"],"~$get-db-names",["^ ","^1",111,"^2",1,"^3",["^4",[1]],"^5","^A","^6","^7","^8","^7","^:",["^ ","~i1",["^ ","~:ret","~:set"]]],"~$*mongodb-write-concern*",["^ ","^1",59,"^2",1,"^5","^D","^6","^7","^8","^7"],"~$*mongodb-port*",["^ ","^1",57,"^2",1,"^5","^E","^6","^7","^8","^7"],"~$admin-db-name",["^ ","^1",257,"^2",1,"^5","^F","^6","^7","^8","^7"],"~$connect",["^ ","^1",66,"^2",1,"^3",["^4",[0,1,3,2]],"^5","^G","^6","^7","^8","^7"],"~:filename","/Users/antares/Development/ClojureWerkz/monger.git/target/classes/monger/core.clj","~$command",["^ ","^1",282,"^2",1,"^3",["^4",[2]],"^5","^I","^6","^7","^8","^7"],"~$connect-via-uri",["^ ","^1",271,"^2",1,"^3",["^4",[1]],"^5","^J","^6","^7","^8","^7","^:",["^ ","~i1",["^ ","^;",["^<",["^="]]]]],"~$*mongodb-host*",["^ ","^1",56,"^2",1,"^5","^K","^6","^7","^8","^7"],"~$set-default-write-concern!",["^ ","^1",265,"^2",1,"^3",["^4",[1]],"^5","^L","^6","^7","^8","^7"],"~$get-gridfs",["^ ","^1",127,"^2",1,"^3",["^4",[2]],"^5","^M","^6","^7","^8","^7","^:",["^ ","~i2",["^ ","^;",["^<",[null,"^="]]]]],"~$connect-with-credentials",["^ ","^1",99,"^2",1,"^3",["^4",[1,3,2]],"^5","^N","^6","^7","^8","^7","^:",["^ ","~i2",["^ ","^;",["^<",["^=",null]]],"~i3",["^ ","^;",["^<",["^=","~:int",null]]]]],"~$Countable",["^ ","^1",298,"^2",1,"^5","^P","^6","^7","^8","^7"],"~$count",["^ ","^1",298,"^2",1,"^3",["^4",[1]],"^5","^Q","^6","^7","^8","^7"],"~$mongo-options",["^ ","^1",247,"^2",1,"^3",["^4",[1]],"^5","^R","^6","^7","^8","^7"],"~$drop-db",["^ ","^1",122,"^2",1,"^3",["^4",[2]],"^5","^S","^6","^7","^8","^7","^:",["^ ","~i2",["^ ","^;",["^<",[null,"^="]]]]],"~$disconnect",["^ ","^1",252,"^2",1,"^3",["^4",[1]],"^5","^T","^6","^7","^8","^7"],"~$mongo-options-builder",["^ ","^1",138,"^2",1,"^3",["^4",[1]],"^5","^U","^6","^7","^8","^7"]] ["^ ","~$admin-db",["^ ","~:row",259,"~:col",1,"~:fixed-arities",["~#set",[1]],"~:name","^0","~:ns","~$monger.core","~:top-ns","^7"],"~$get-db",["^ ","^1",117,"^2",1,"^3",["^4",[2]],"^5","^9","^6","^7","^8","^7","~:arities",["^ ","~i2",["^ ","~:args",["~#list",[null,"~:nilable/string"]]]]],"~$server-address",["^ ","^1",132,"^2",1,"^3",["^4",[1,2]],"^5","^>","^6","^7","^8","^7","^:",["^ ","~i1",["^ ","^;",["^<",["^="]]],"~i2",["^ ","^;",["^<",["^=","~:nilable/int"]]]]],"~$raw-command",["^ ","^1",293,"^2",1,"^3",["^4",[2]],"^5","^@","^6","^7","^8","^7"],"~$get-db-names",["^ ","^1",111,"^2",1,"^3",["^4",[1]],"^5","^A","^6","^7","^8","^7","^:",["^ ","~i1",["^ ","~:ret","~:set"]]],"~$*mongodb-write-concern*",["^ ","^1",59,"^2",1,"^5","^D","^6","^7","^8","^7"],"~$*mongodb-port*",["^ ","^1",57,"^2",1,"^5","^E","^6","^7","^8","^7"],"~$admin-db-name",["^ ","^1",257,"^2",1,"^5","^F","^6","^7","^8","^7"],"~$connect",["^ ","^1",66,"^2",1,"^3",["^4",[0,1,3,2]],"^5","^G","^6","^7","^8","^7"],"~:filename","/Users/antares/Development/ClojureWerkz/monger.git/src/clojure/monger/core.clj","~$command",["^ ","^1",282,"^2",1,"^3",["^4",[2]],"^5","^I","^6","^7","^8","^7"],"~$connect-via-uri",["^ ","^1",271,"^2",1,"^3",["^4",[1]],"^5","^J","^6","^7","^8","^7","^:",["^ ","~i1",["^ ","^;",["^<",["^="]]]]],"~$*mongodb-host*",["^ ","^1",56,"^2",1,"^5","^K","^6","^7","^8","^7"],"~$set-default-write-concern!",["^ ","^1",265,"^2",1,"^3",["^4",[1]],"^5","^L","^6","^7","^8","^7"],"~$get-gridfs",["^ ","^1",127,"^2",1,"^3",["^4",[2]],"^5","^M","^6","^7","^8","^7","^:",["^ ","~i2",["^ ","^;",["^<",[null,"^="]]]]],"~$connect-with-credentials",["^ ","^1",99,"^2",1,"^3",["^4",[1,3,2]],"^5","^N","^6","^7","^8","^7","^:",["^ ","~i2",["^ ","^;",["^<",["^=",null]]],"~i3",["^ ","^;",["^<",["^=","~:int",null]]]]],"~$Countable",["^ ","^1",298,"^2",1,"^5","^P","^6","^7","^8","^7"],"~$count",["^ ","^1",298,"^2",1,"^3",["^4",[1]],"^5","^Q","^6","^7","^8","^7"],"~$mongo-options",["^ ","^1",247,"^2",1,"^3",["^4",[1]],"^5","^R","^6","^7","^8","^7"],"~$drop-db",["^ ","^1",122,"^2",1,"^3",["^4",[2]],"^5","^S","^6","^7","^8","^7","^:",["^ ","~i2",["^ ","^;",["^<",[null,"^="]]]]],"~$disconnect",["^ ","^1",252,"^2",1,"^3",["^4",[1]],"^5","^T","^6","^7","^8","^7"],"~$mongo-options-builder",["^ ","^1",138,"^2",1,"^3",["^4",[1]],"^5","^U","^6","^7","^8","^7"]]

View file

@ -130,9 +130,7 @@
(deftest test-explain-aggregate (deftest test-explain-aggregate
(let [batch [{:state "CA" :price 100} (let [batch [{:state "CA" :price 100}
{:state "CA" :price 10} {:state "CA" :price 10}
{:state "IL" :price 50}] {:state "IL" :price 50}]]
expected-keys #{:ok :stages}]
(mc/insert-batch db coll batch) (mc/insert-batch db coll batch)
(let [result (mc/explain-aggregate db coll [{$match {:state "CA"}}]) (let [result (mc/explain-aggregate db coll [{$match {:state "CA"}}])]
key-in-result? (partial contains? result)] (is (:ok result))))))
(is (every? key-in-result? expected-keys))))))