Changed stats name from featureCount to estimatedFeatureCount

This commit is contained in:
Mario de Frutos 2017-05-11 12:47:35 +02:00
parent 968677e275
commit 61f9ea6e86

View File

@ -95,7 +95,7 @@ describe('Create mapnik layergroup', function() {
testClient.getLayergroup(function(err, layergroup) {
assert.ok(!err);
assert.equal(layergroup.metadata.layers[0].id, mapnikBasicLayerId(0));
assert.equal(layergroup.metadata.layers[0].meta.stats[0].featureCount, 5);
assert.equal(layergroup.metadata.layers[0].meta.stats.estimatedFeatureCount, 5);
testClient.drain(done);
});
});
@ -112,9 +112,9 @@ describe('Create mapnik layergroup', function() {
testClient.getLayergroup(function(err, layergroup) {
assert.ok(!err);
assert.equal(layergroup.metadata.layers[0].id, mapnikBasicLayerId(0));
assert.equal(layergroup.metadata.layers[0].meta.stats[0].featureCount, 5);
assert.equal(layergroup.metadata.layers[0].meta.stats.estimatedFeatureCount, 5);
assert.equal(layergroup.metadata.layers[1].id, mapnikBasicLayerId(1));
assert.equal(layergroup.metadata.layers[1].meta.stats[0].featureCount, 5);
assert.equal(layergroup.metadata.layers[1].meta.stats.estimatedFeatureCount, 5);
testClient.drain(done);
});
});
@ -132,11 +132,11 @@ describe('Create mapnik layergroup', function() {
testClient.getLayergroup(function(err, layergroup) {
assert.ok(!err);
assert.equal(layergroup.metadata.layers[0].id, mapnikBasicLayerId(0));
assert.equal(layergroup.metadata.layers[0].meta.stats[0].featureCount, 5);
assert.equal(layergroup.metadata.layers[0].meta.stats.estimatedFeatureCount, 5);
assert.equal(layergroup.metadata.layers[1].id, mapnikBasicLayerId(1));
assert.equal(layergroup.metadata.layers[1].meta.stats[0].featureCount, 5);
assert.equal(layergroup.metadata.layers[1].meta.stats.estimatedFeatureCount, 5);
assert.equal(layergroup.metadata.layers[2].id, mapnikBasicLayerId(2));
assert.equal(layergroup.metadata.layers[2].meta.stats[0].featureCount, 5);
assert.equal(layergroup.metadata.layers[2].meta.stats.estimatedFeatureCount, 5);
testClient.drain(done);
});
});
@ -152,8 +152,7 @@ describe('Create mapnik layergroup', function() {
testClient.getLayergroup(function(err, layergroup) {
assert.ok(!err);
assert.equal(layergroup.metadata.layers[0].id, mapnikBasicLayerId(0));
assert.equal(layergroup.metadata.layers[0].meta.stats[0].featureCount, 5);
assert.equal(layergroup.metadata.layers[0].meta.stats[1].featureCount, 5);
assert.equal(layergroup.metadata.layers[0].meta.stats.estimatedFeatureCount, 10);
testClient.drain(done);
});
});
@ -170,11 +169,9 @@ describe('Create mapnik layergroup', function() {
testClient.getLayergroup(function(err, layergroup) {
assert.ok(!err);
assert.equal(layergroup.metadata.layers[0].id, mapnikBasicLayerId(0));
assert.equal(layergroup.metadata.layers[0].meta.stats[0].featureCount, 5);
assert.equal(layergroup.metadata.layers[0].meta.stats[1].featureCount, 5);
assert.equal(layergroup.metadata.layers[0].meta.stats.estimatedFeatureCount, 10);
assert.equal(layergroup.metadata.layers[1].id, mapnikBasicLayerId(1));
assert.equal(layergroup.metadata.layers[1].meta.stats[0].featureCount, 5);
assert.equal(layergroup.metadata.layers[1].meta.stats[1].featureCount, 5);
assert.equal(layergroup.metadata.layers[1].meta.stats.estimatedFeatureCount, 10);
testClient.drain(done);
});
});
@ -191,12 +188,10 @@ describe('Create mapnik layergroup', function() {
testClient.getLayergroup(function(err, layergroup) {
assert.ok(!err);
assert.equal(layergroup.metadata.layers[0].id, mapnikBasicLayerId(0));
assert.equal(layergroup.metadata.layers[0].meta.stats[0].featureCount, 5);
assert.equal(layergroup.metadata.layers[0].meta.stats.estimatedFeatureCount, 5);
assert.ok(!layergroup.metadata.layers[0].meta.stats[1]);
assert.equal(layergroup.metadata.layers[1].id, mapnikBasicLayerId(1));
assert.equal(layergroup.metadata.layers[1].meta.stats[0].featureCount, 5);
assert.equal(layergroup.metadata.layers[1].meta.stats[1].featureCount, 5);
assert.ok(!layergroup.metadata.layers[1].meta.stats[2]);
assert.equal(layergroup.metadata.layers[1].meta.stats.estimatedFeatureCount, 10);
assert.ok(!layergroup.metadata.layers[2]);
testClient.drain(done);
});
@ -215,7 +210,7 @@ describe('Create mapnik layergroup', function() {
assert.ok(!err);
assert.equal(layergroup.metadata.layers[0].id, mapnikBasicLayerId(0));
assert.equal(layergroup.metadata.layers[0].type, 'mapnik');
assert.equal(layergroup.metadata.layers[0].meta.stats[0].featureCount, 5);
assert.equal(layergroup.metadata.layers[0].meta.stats.estimatedFeatureCount, 5);
assert.equal(layergroup.metadata.layers[1].id, typeLayerId('http', 0));
assert.equal(layergroup.metadata.layers[1].type, 'http');
testClient.drain(done);
@ -236,7 +231,7 @@ describe('Create mapnik layergroup', function() {
assert.equal(layergroup.metadata.layers[0].id, typeLayerId('http', 0));
assert.equal(layergroup.metadata.layers[0].type, 'http');
assert.ok(!layergroup.metadata.layers[0].meta.cartocss);
assert.equal(layergroup.metadata.layers[1].meta.stats[0].featureCount, 5);
assert.equal(layergroup.metadata.layers[1].meta.stats.estimatedFeatureCount, 5);
assert.equal(layergroup.metadata.layers[1].id, mapnikBasicLayerId(0));
assert.equal(layergroup.metadata.layers[1].type, 'mapnik');
assert.equal(layergroup.metadata.layers[1].meta.cartocss, cartocss);
@ -256,7 +251,7 @@ describe('Create mapnik layergroup', function() {
assert.ok(!err);
assert.equal(layergroup.metadata.layers[0].id, mapnikBasicLayerId(0));
// we don't care about stats here as is an aliased column
assert.ok(layergroup.metadata.layers[0].meta.stats[0].hasOwnProperty('featureCount'));
assert.ok(layergroup.metadata.layers[0].meta.stats.hasOwnProperty('estimatedFeatureCount'));
testClient.drain(done);
});
});