Skip to content

Instantly share code, notes, and snippets.

@fons
Created August 17, 2012 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fons/3382590 to your computer and use it in GitHub Desktop.
Save fons/3382590 to your computer and use it in GitHub Desktop.
mongodb regression test
CL-MONGO-TEST> (quick-test)
---- starting test of package : { test counting documents } ---------------
testing counting : client count : 43 -- server count 43.0d0
---- finished test of package { test counting documents } sucessfully ------
---- starting test of package : { finding documents by field } ---------------
findOne is default : 1
limit == 0 returns all 43 : 43
---- finished test of package { finding documents by field } sucessfully ------
---- starting test of package : { deleting documents } ---------------
---- finished test of package { deleting documents } sucessfully ------
---- starting test of package : { finding documents } ---------------
INDEX failed:
Expected 0 but saw 36
DESCRIPTION => "assuming first document has index 0"
FIRST-INDEX failed:
Expected 21 but saw 26
DESCRIPTION => "testing assumption of first index value"
---- finished test of package { finding documents } sucessfully ------
---- starting test of package : { finding documents with a selector } ---------------
elems with key k : (97.0d0 98.0d0 68.0d0 69.0d0 70.0d0 71.0d0 72.0d0
73.0d0 74.0d0 75.0d0 76.0d0 77.0d0 78.0d0 79.0d0
80.0d0 81.0d0 82.0d0 83.0d0 84.0d0 85.0d0 86.0d0
87.0d0 88.0d0 89.0d0 90.0d0 91.0d0 92.0d0 93.0d0
94.0d0 95.0d0 96.0d0 56.0d0 57.0d0 58.0d0 59.0d0
60.0d0 61.0d0 62.0d0 63.0d0 64.0d0 65.0d0 66.0d0
67.0d0)
elems with key l : (32.0d0 33.0d0 3.0d0 4.0d0 5.0d0 6.0d0 7.0d0 8.0d0
9.0d0 10.0d0 11.0d0 12.0d0 13.0d0 14.0d0 15.0d0 16.0d0
17.0d0 18.0d0 19.0d0 20.0d0 21.0d0 22.0d0 23.0d0
24.0d0 25.0d0 26.0d0 27.0d0 28.0d0 29.0d0 30.0d0
31.0d0 -9.0d0 -8.0d0 -7.0d0 -6.0d0 -5.0d0 -4.0d0
-3.0d0 -2.0d0 -1.0d0 0.0d0 1.0d0 2.0d0)
elems with key 'index-this' (s/b none) : (NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL)
elems with key k (s/b none !) : (NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL)
elems with key l (s/b none !) : (NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL)
elems with key index-this : (41 42 12 13 14 15 16 17 18 19 20 21 22 23 24
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
40 0 1 2 3 4 5 6 7 8 9 10 11)
---- finished test of package { finding documents with a selector } sucessfully ------
---- starting test of package : { sorting documents by field } ---------------
------------------------------------------------------------
sorting test : printing out server side sorted arrays; no test yet ..
elem : (56.0d0 57.0d0 58.0d0 59.0d0 60.0d0 61.0d0 62.0d0 63.0d0 64.0d0
65.0d0 66.0d0 67.0d0 68.0d0 69.0d0 70.0d0 71.0d0 72.0d0 73.0d0
74.0d0 75.0d0 76.0d0 77.0d0 78.0d0 79.0d0 80.0d0 81.0d0 82.0d0
83.0d0 84.0d0 85.0d0 86.0d0 87.0d0 88.0d0 89.0d0 90.0d0 91.0d0
92.0d0 93.0d0 94.0d0 95.0d0 96.0d0 97.0d0 98.0d0)
elem : (98.0d0 97.0d0 96.0d0 95.0d0 94.0d0 93.0d0 92.0d0 91.0d0 90.0d0
89.0d0 88.0d0 87.0d0 86.0d0 85.0d0 84.0d0 83.0d0 82.0d0 81.0d0
80.0d0 79.0d0 78.0d0 77.0d0 76.0d0 75.0d0 74.0d0 73.0d0 72.0d0
71.0d0 70.0d0 69.0d0 68.0d0 67.0d0 66.0d0 65.0d0 64.0d0 63.0d0
62.0d0 61.0d0 60.0d0 59.0d0 58.0d0 57.0d0 56.0d0)
------------------------------------------------------------
---- finished test of package { sorting documents by field } sucessfully ------
---- starting test of package : { matching document elements by field } ---------------
---- finished test of package { matching document elements by field } sucessfully ------
---- starting test of package : { advanced query regression elements } ---------------
---- finished test of package { advanced query regression elements } sucessfully ------
---- starting test of package : { advanced query regression elements; part 2 } ---------------
---- finished test of package { advanced query regression elements; part 2 } sucessfully ------
---- starting test of package : { test update modifiers } ---------------
---- finished test of package { test update modifiers } sucessfully ------
---- starting test of package : { test java script (local and remote) } ---------------
"errmsg" -> ns not found
"ok" -> 0.0d0
(MAPCAR (LAMBDA (D) (GET-ELEMENT "field" D)) (DOCS (DB.FIND "foo" :ALL))) failed:
Expected (1.0d0 2.0d0 3.0d0 4.0d0 5.0d0) but saw (1.0d0)
DESCRIPTION => "remotely create objects"
---- finished test of package { test java script (local and remote) } sucessfully ------
---- starting test of package : { test map-reduce) } ---------------
(LENGTH (CL-MONGO::MR.COLLECTIONS)) failed:
Expected 2 but saw 0
DESCRIPTION => "automatic cleanup of temp map-reduce stores"
---- finished test of package { test map-reduce) } sucessfully ------
---- starting test of package : { test indexing } ---------------
"errmsg" -> ns not found
"ok" -> 0.0d0
(GET-ELEMENT "n" (CAR (DOCS (DB.COUNT "foo" :ALL)))) failed:
Expected 86.0d0 but saw 43.0d0; T
DESCRIPTION => "testing indexing on index_this2; simple, should double the doc count "
[{name : _id_} {ns : test.foo} {key : } {v : 0} ]
[{name : _id_} {ns : test.error} {key : } {v : 0} ]
[{name : _id_} {ns : test.system.js} {key : } {v : 0} ]
[{name : _id_} {ns : test.test} {key : } {v : 0} ]
[{name : index_this2_1} {ns : test.foo} {key : (index_this2 : 1.0d0) } {v : 0} ]
[{name : index_this2_-1} {ns : test.foo} {key : (index_this2 : -1.0d0) } {unique : T} {dropDups : T} {v : 0} ]
[{name : _id_} {v : 1} {key : } {ns : test.testit} ]
[{name : _id_} {v : 1} {key : } {ns : test.mr.foo} ]
(GET-ELEMENT "n" (CAR (DOCS (DB.COUNT "foo" :ALL)))) failed:
Expected 129.0d0 but saw 43.0d0; T
DESCRIPTION => "testing unique index on index_this2, desc; should increase count"
[{name : _id_} {ns : test.foo} {key : } {v : 0} ]
[{name : _id_} {ns : test.error} {key : } {v : 0} ]
[{name : _id_} {ns : test.system.js} {key : } {v : 0} ]
[{name : _id_} {ns : test.test} {key : } {v : 0} ]
[{name : index_this2_1} {ns : test.foo} {key : (index_this2 : 1.0d0) } {v : 0} ]
[{name : index_this2_-1} {ns : test.foo} {key : (index_this2 : -1.0d0) } {unique : T} {dropDups : T} {v : 0} ]
[{name : _id_} {v : 1} {key : } {ns : test.testit} ]
[{name : _id_} {v : 1} {key : } {ns : test.mr.foo} ]
"errmsg" -> ns not found
"ok" -> 0.0d0
---- finished test of package { test indexing } sucessfully ------
---- starting test of package : { test serialization; inspect visually } ---------------
{
"_id" -> objectid(6DE71BA5DBE641 BB73984 B)
"date-time" -> CL-MONGO::BSON-TIME Mon Apr 5 2010 16:34:12 (GMT-5)
"string" -> hello world generated by test-document
"number89" -> 89
"numberbig" -> 89988787777887
"float 89.67" -> 89.66999816894531d0
"list-1" -> [ 1, 2, 3, 4,]
"list-2" -> [ 1,[ inside, 3, 4, list,], the end,]
"doc2" ->
{
"_id" -> objectid(503A67040892472D839D1917)
"key-1" -> doc in doc !!
"key-2" -> 56.88999938964844d0
"doc3" ->
{
"_id" -> objectid(FF6499DA50F6442A8F9D6C3C)
"array" -> [[[ inside a nest!!,],],]
"key56" -> 56
}
}
}
---- finished test of package { test serialization; inspect visually } sucessfully ------
NIL
CL-MONGO-TEST>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment