diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-08-10 21:04:13 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-08-10 21:04:13 -0400 |
commit | 386aa02cce9b0d47cf1dfd932530234fe8f689a7 (patch) | |
tree | fd0d9cb656751d45fee03cd6a296ef388b9d5d5d /jstests/hint1.js | |
parent | d2dc0575e0e36059a8cd818b4ef6e0c71525c708 (diff) | |
download | mongo-386aa02cce9b0d47cf1dfd932530234fe8f689a7.tar.gz |
fix test and clean code
Diffstat (limited to 'jstests/hint1.js')
-rw-r--r-- | jstests/hint1.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/jstests/hint1.js b/jstests/hint1.js index 999f4f49597..416eb4a13ae 100644 --- a/jstests/hint1.js +++ b/jstests/hint1.js @@ -1,8 +1,10 @@ + p = db.jstests_hint1; +p.drop(); p.save( { ts: new Date( 1 ), cls: "entry", verticals: "alleyinsider", live: true } ); p.ensureIndex( { ts: 1 } ); e = p.find( { live: true, ts: { $lt: new Date( 1234119308272 ) }, cls: "entry", verticals: " alleyinsider" } ).sort( { ts: -1 } ).hint( { ts: 1 } ).explain(); -assert.eq( e.startKey.ts.getTime(), new Date( 1234119308272 ).getTime() ); -assert.eq( 1, e.endKey.ts.$minElement ); +assert.eq( e.startKey.ts.getTime(), new Date( 1234119308272 ).getTime() , "A" ); +assert.eq( 0 , e.endKey.ts.getTime() , "B" ); |