Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.8] Fix integration tests: Check for root before shutdown, bail after 1 reported issue (#155938) #156013

Merged
merged 2 commits into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

module.exports = {
bail: true, // only report 1 issue
// TODO replace the line below with
// preset: '@kbn/test/jest_integration_node
// to do so, we must fix all integration tests first
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ describe('SavedObjectsRepository', () => {
});

afterAll(async () => {
await esServer.stop();
await root.shutdown();
if (root) {
await esServer.stop();
await root.shutdown();
}
});

describe('#incrementCounter', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,11 @@ describe('404s from proxies', () => {
});

afterAll(async () => {
await root.shutdown();
await hapiServer.stop({ timeout: 1000 });
await esServer.stop();
if (root) {
await root.shutdown();
await hapiServer.stop({ timeout: 1000 });
await esServer.stop();
}
});

describe('requests when a proxy relays request/responses with the correct product header', () => {
Expand Down