Refactoring tests hooks
This commit is contained in:
parent
49d2f513c6
commit
bb59902535
@ -58,20 +58,18 @@ const createMapConfig = ({
|
|||||||
describe('user database timeout limit', function () {
|
describe('user database timeout limit', function () {
|
||||||
describe('dataview', function () {
|
describe('dataview', function () {
|
||||||
beforeEach(function (done) {
|
beforeEach(function (done) {
|
||||||
|
const mapconfig = createMapConfig();
|
||||||
|
this.testClient = new TestClient(mapconfig, 1234);
|
||||||
TestClient.setUserDatabaseTimeoutLimit('localhost', 200, done);
|
TestClient.setUserDatabaseTimeoutLimit('localhost', 200, done);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(function (done) {
|
afterEach(function (done) {
|
||||||
TestClient.setUserDatabaseTimeoutLimit('localhost', 0, done);
|
TestClient.setUserDatabaseTimeoutLimit('localhost', 0, (err) => {
|
||||||
});
|
if (err) {
|
||||||
|
return done(err);
|
||||||
beforeEach(function () {
|
}
|
||||||
const mapconfig = createMapConfig();
|
this.testClient.drain(done);
|
||||||
this.testClient = new TestClient(mapconfig, 1234);
|
});
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(function (done) {
|
|
||||||
this.testClient.drain(done);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('layergroup creation works but dataview request fails due to statement timeout', function (done) {
|
it('layergroup creation works but dataview request fails due to statement timeout', function (done) {
|
||||||
|
Loading…
Reference in New Issue
Block a user