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.10] [Flaky test #90578] Unskip test (#163696) #164711

Merged
merged 1 commit into from
Aug 24, 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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ export class FatalErrorsScreen extends React.Component<Props, State> {

public render() {
return (
<EuiPage style={{ minHeight: '100vh', alignItems: 'center' }}>
<EuiPage
style={{ minHeight: '100vh', alignItems: 'center' }}
data-test-subj="fatalErrorScreen"
>
<EuiPageBody>
<EuiPageSection alignment="center">
<EuiEmptyPrompt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ export class FatalErrorsService {
private setupGlobalErrorHandlers() {
if (window.addEventListener) {
window.addEventListener('unhandledrejection', (e) => {
console.log(`Detected an unhandled Promise rejection.\n${e.reason}`); // eslint-disable-line no-console
const { message, stack } = getErrorInfo(e.reason);
// eslint-disable-next-line no-console
console.log(`Detected an unhandled Promise rejection.\n
Message: ${message}\n
Stack: ${stack}`);
});
}
}
Expand Down
12 changes: 12 additions & 0 deletions test/functional/page_objects/common_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ export class CommonPageObject extends FtrService {
search = '',
disableWelcomePrompt = true,
insertTimestamp = true,
retryOnFatalError = true,
} = {}
) {
let appUrl: string;
Expand Down Expand Up @@ -293,6 +294,13 @@ export class CommonPageObject extends FtrService {
this.log.debug(msg);
throw new Error(msg);
}

if (retryOnFatalError && (await this.isFatalErrorScreen())) {
const msg = `Fatal error screen shown. Let's try refreshing the page once more.`;
this.log.debug(msg);
throw new Error(msg);
}

if (appName === 'discover') {
await this.browser.setLocalStorageItem('data.autocompleteFtuePopover', 'true');
}
Expand Down Expand Up @@ -402,6 +410,10 @@ export class CommonPageObject extends FtrService {
return await this.testSubjects.exists('kbnAppWrapper hiddenChrome');
}

async isFatalErrorScreen() {
return await this.testSubjects.exists('fatalErrorScreen');
}

async waitForTopNavToBeVisible() {
await this.retry.try(async () => {
const isNavVisible = await this.testSubjects.exists('top-nav');
Expand Down
3 changes: 1 addition & 2 deletions x-pack/test/saved_object_tagging/functional/tests/listing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const PageObjects = getPageObjects(['common', 'security', 'savedObjects', 'tagManagement']);
const tagManagementPage = PageObjects.tagManagement;

// FLAKY: https://github.com/elastic/kibana/issues/90578
describe.skip('table listing', () => {
describe('table listing', () => {
before(async () => {
await kibanaServer.importExport.load(
'x-pack/test/saved_object_tagging/common/fixtures/es_archiver/functional_base/data.json'
Expand Down