mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-29 09:42:23 +00:00
Fix: Observablity alert flaky test (#21107)
* fixed observity alert flaky test * fixed timeout issue * fixed timeout issue * fixed comments (cherry picked from commit 3d2ae8fff6be077a32b56ccc7caf5503bfa7afa7)
This commit is contained in:
parent
9b8dca394b
commit
ebe397d041
@ -101,6 +101,8 @@ const data = {
|
||||
};
|
||||
|
||||
test.beforeAll(async ({ browser }) => {
|
||||
test.slow();
|
||||
|
||||
const { afterAction, apiContext } = await performAdminLogin(browser);
|
||||
await commonPrerequisites({
|
||||
apiContext,
|
||||
@ -115,6 +117,8 @@ test.beforeAll(async ({ browser }) => {
|
||||
});
|
||||
|
||||
test.afterAll('Cleanup', async ({ browser }) => {
|
||||
test.slow();
|
||||
|
||||
const { afterAction, apiContext } = await performAdminLogin(browser);
|
||||
await commonCleanup({
|
||||
apiContext,
|
||||
|
||||
@ -99,6 +99,8 @@ const data = {
|
||||
};
|
||||
|
||||
test.beforeAll(async ({ browser }) => {
|
||||
test.slow();
|
||||
|
||||
const { afterAction, apiContext } = await performAdminLogin(browser);
|
||||
await commonPrerequisites({
|
||||
apiContext,
|
||||
@ -135,6 +137,8 @@ test.afterAll(async ({ browser }) => {
|
||||
});
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
test.slow();
|
||||
|
||||
await visitObservabilityAlertPage(page);
|
||||
});
|
||||
|
||||
|
||||
@ -158,6 +158,10 @@ export const findPageWithAlert = async (
|
||||
alertDetails: AlertDetails
|
||||
) => {
|
||||
const { id } = alertDetails;
|
||||
await page.waitForLoadState('networkidle');
|
||||
await page.waitForSelector('[data-testid="loader"]', {
|
||||
state: 'detached',
|
||||
});
|
||||
const alertRow = page.locator(`[data-row-key="${id}"]`);
|
||||
const nextButton = page.locator('[data-testid="next"]');
|
||||
if ((await alertRow.isHidden()) && (await nextButton.isEnabled())) {
|
||||
@ -829,8 +833,8 @@ export const waitForRecentEventsToFinishExecution = async (
|
||||
{
|
||||
// Custom expect message for reporting, optional.
|
||||
message: 'Wait for pending events to complete',
|
||||
intervals: [5_000, 10_000, 15_000],
|
||||
timeout: 600_000,
|
||||
intervals: [5_000, 10_000, 15_000, 20_000],
|
||||
timeout: 900_000,
|
||||
}
|
||||
)
|
||||
// Move ahead when the pending events count is 0
|
||||
|
||||
@ -41,6 +41,10 @@ import { sidebarClick } from './sidebar';
|
||||
|
||||
export const visitObservabilityAlertPage = async (page: Page) => {
|
||||
await redirectToHomePage(page);
|
||||
await page.waitForLoadState('networkidle');
|
||||
await page.waitForSelector('[data-testid="loader"]', {
|
||||
state: 'detached',
|
||||
});
|
||||
const getAlerts = page.waitForResponse(
|
||||
'/api/v1/events/subscriptions?*alertType=Observability*'
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user