summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2011-09-06 12:22:31 -0400
committerEliot Horowitz <eliot@10gen.com>2011-09-06 12:22:47 -0400
commit3f7ab8d55bffb2fda0575b0c82eb766c868a5eea (patch)
tree3394d659809902f038207b136615059e85947209 /jstests
parentdf769f03a45540f475bab0db10a560469a096911 (diff)
downloadmongo-3f7ab8d55bffb2fda0575b0c82eb766c868a5eea.tar.gz
don't run geo_polygon on os x 10.5
Diffstat (limited to 'jstests')
-rw-r--r--jstests/slowNightly/geo_polygon.js62
1 files changed, 38 insertions, 24 deletions
diff --git a/jstests/slowNightly/geo_polygon.js b/jstests/slowNightly/geo_polygon.js
index 7105c1ed30d..b4dd3e85669 100644
--- a/jstests/slowNightly/geo_polygon.js
+++ b/jstests/slowNightly/geo_polygon.js
@@ -1,35 +1,49 @@
t = db.geo_polygon4;
t.drop();
-num = 0;
-for ( x = -180; x < 180; x += .5 ){
- for ( y = -180; y < 180; y += .5 ){
- o = { _id : num++ , loc : [ x , y ] };
- t.save( o );
- }
+shouldRun = true;
+
+bi = db.adminCommand( "buildinfo" ).sysInfo
+if ( bi.indexOf( "erh2" ) >= 0 ){
+ // this machine runs this test very slowly
+ // it seems to be related to osx 10.5
+ // if this machine gets upgraded, we should remove this check
+ // the os x debug builders still run thistest, so i'm not worried about it
+ shouldRun = false;
}
-var numTests = 31;
-for( var n = 0; n < numTests; n++ ){
- t.dropIndexes()
- t.ensureIndex( { loc : "2d" }, { bits : 2 + n } );
+if ( shouldRun ) {
+
+ num = 0;
+ for ( x = -180; x < 180; x += .5 ){
+ for ( y = -180; y < 180; y += .5 ){
+ o = { _id : num++ , loc : [ x , y ] };
+ t.save( o );
+ }
+ }
+ var numTests = 31;
+ for( var n = 0; n < numTests; n++ ){
+ t.dropIndexes()
+ t.ensureIndex( { loc : "2d" }, { bits : 2 + n } );
- assert.eq( 9 , t.find( { loc: { "$within": { "$polygon" : [[0,0], [1,1], [0,2]] }}} ).count() , "Triangle Test" );
- assert.eq( num , t.find( { loc : { "$within" : { "$polygon" : [ [-180,-180], [-180,180], [180,180], [180,-180] ] } } } ).count() , "Bounding Box Test" );
- assert.eq( 441 , t.find( { loc : { "$within" : { "$polygon" : [ [0,0], [0,10], [10,10], [10,0] ] } } } ).count() , "Square Test" );
- assert.eq( 25 , t.find( { loc : { "$within" : { "$polygon" : [ [0,0], [0,2], [2,2], [2,0] ] } } } ).count() , "Square Test 2" );
- if(0){ // SERVER-3726
- assert.eq( 331 , t.find( { loc : { "$within" : { "$polygon" : [ [0,0], [0,10], [10,10], [10,0], [5,5] ] } } } ).count() , "Square Missing Chunk Test" );
- assert.eq( 21 , t.find( { loc : { "$within" : { "$polygon" : [ [0,0], [0,2], [2,2], [2,0], [1,1] ] } } } ).count() , "Square Missing Chunk Test 2" );
- }
+ assert.eq( 9 , t.find( { loc: { "$within": { "$polygon" : [[0,0], [1,1], [0,2]] }}} ).count() , "Triangle Test" );
+ assert.eq( num , t.find( { loc : { "$within" : { "$polygon" : [ [-180,-180], [-180,180], [180,180], [180,-180] ] } } } ).count() , "Bounding Box Test" );
+
+ assert.eq( 441 , t.find( { loc : { "$within" : { "$polygon" : [ [0,0], [0,10], [10,10], [10,0] ] } } } ).count() , "Square Test" );
+ assert.eq( 25 , t.find( { loc : { "$within" : { "$polygon" : [ [0,0], [0,2], [2,2], [2,0] ] } } } ).count() , "Square Test 2" );
+ if(0){ // SERVER-3726
+ assert.eq( 331 , t.find( { loc : { "$within" : { "$polygon" : [ [0,0], [0,10], [10,10], [10,0], [5,5] ] } } } ).count() , "Square Missing Chunk Test" );
+ assert.eq( 21 , t.find( { loc : { "$within" : { "$polygon" : [ [0,0], [0,2], [2,2], [2,0], [1,1] ] } } } ).count() , "Square Missing Chunk Test 2" );
+ }
- assert.eq( 1 , t.find( { loc: { "$within": { "$polygon" : [[0,0], [0,0], [0,0]] }}} ).count() , "Point Test" );
- if(0){ // SERVER-3725
- assert.eq( 5 , t.find( { loc: { "$within": { "$polygon" : [[0,0], [1,0], [2,0]] }}} ).count() , "Line Test 1" );
- assert.eq( 3 , t.find( { loc: { "$within": { "$polygon" : [[0,0], [0,0], [1,0]] }}} ).count() , "Line Test 2" );
- assert.eq( 5 , t.find( { loc: { "$within": { "$polygon" : [[0,2], [0,1], [0,0]] }}} ).count() , "Line Test 3" );
+ assert.eq( 1 , t.find( { loc: { "$within": { "$polygon" : [[0,0], [0,0], [0,0]] }}} ).count() , "Point Test" );
+ if(0){ // SERVER-3725
+ assert.eq( 5 , t.find( { loc: { "$within": { "$polygon" : [[0,0], [1,0], [2,0]] }}} ).count() , "Line Test 1" );
+ assert.eq( 3 , t.find( { loc: { "$within": { "$polygon" : [[0,0], [0,0], [1,0]] }}} ).count() , "Line Test 2" );
+ assert.eq( 5 , t.find( { loc: { "$within": { "$polygon" : [[0,2], [0,1], [0,0]] }}} ).count() , "Line Test 3" );
+ }
+ assert.eq( 3 , t.find( { loc: { "$within": { "$polygon" : [[0,1], [0,0], [0,0]] }}} ).count() , "Line Test 4" );
}
- assert.eq( 3 , t.find( { loc: { "$within": { "$polygon" : [[0,1], [0,0], [0,0]] }}} ).count() , "Line Test 4" );
}