Torque boundaries tests: Sort objects before comparison
Order is not guaranteed by torque and changed behaviour from PG 9.5 to 10
This commit is contained in:
parent
4ba2632a92
commit
0fdab08600
3
NEWS.md
3
NEWS.md
@ -10,6 +10,8 @@ Released 2018-01-04
|
|||||||
New features:
|
New features:
|
||||||
- Return url template in metadata #838.
|
- Return url template in metadata #838.
|
||||||
|
|
||||||
|
Bux fixes:
|
||||||
|
- Tests: Order torque objects before comparison
|
||||||
|
|
||||||
## 4.7.0
|
## 4.7.0
|
||||||
Released 2018-01-03
|
Released 2018-01-03
|
||||||
@ -30,7 +32,6 @@ Announcements:
|
|||||||
- Fix column names collisions in histograms [#828](https://github.com/CartoDB/Windshaft-cartodb/pull/828).
|
- Fix column names collisions in histograms [#828](https://github.com/CartoDB/Windshaft-cartodb/pull/828).
|
||||||
- Add full-sample aggregation support for vector map-config.
|
- Add full-sample aggregation support for vector map-config.
|
||||||
|
|
||||||
|
|
||||||
## 4.5.0
|
## 4.5.0
|
||||||
Released 2017-12-19
|
Released 2017-12-19
|
||||||
|
|
||||||
|
@ -257,6 +257,14 @@ describe('torque boundary points', function() {
|
|||||||
assert.equal(res.statusCode, 200, res.body);
|
assert.equal(res.statusCode, 200, res.body);
|
||||||
assert.equal(res.headers['content-type'], "application/json; charset=utf-8");
|
assert.equal(res.headers['content-type'], "application/json; charset=utf-8");
|
||||||
var parsed = JSON.parse(res.body);
|
var parsed = JSON.parse(res.body);
|
||||||
|
/* Order the JSON first by descending x__uint8 and ascending
|
||||||
|
* y__uint8 */
|
||||||
|
parsed.sort(function(a,b) {
|
||||||
|
if (a.x__uint8 === b.x__uint8) {
|
||||||
|
return (a.y__uint8 > b.y__uint8);
|
||||||
|
}
|
||||||
|
return (a.x__uint8 < b.x__uint8);
|
||||||
|
});
|
||||||
|
|
||||||
var i = 0;
|
var i = 0;
|
||||||
tileRequest.expects.forEach(function(expected) {
|
tileRequest.expects.forEach(function(expected) {
|
||||||
@ -424,7 +432,7 @@ describe('torque boundary points', function() {
|
|||||||
|
|
||||||
var parsed = JSON.parse(res.body);
|
var parsed = JSON.parse(res.body);
|
||||||
|
|
||||||
assert.deepEqual(parsed, [
|
assert.deepEqual(parsed.sort(function(a,b){return a.x__uint8 > b.x__uint8;}), [
|
||||||
{
|
{
|
||||||
x__uint8: 47,
|
x__uint8: 47,
|
||||||
y__uint8: 127,
|
y__uint8: 127,
|
||||||
@ -438,7 +446,6 @@ describe('torque boundary points', function() {
|
|||||||
dates__uint16: [0]
|
dates__uint16: [0]
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user