mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-30 20:06:19 +00:00
fix(test): dbt cypress flakiness (#11155)
* fix(test): dbt cypress flakiness * added wait for ingestionPipelineStatus * fixed wait issue * added API wait * revet removal of service interception --------- Co-authored-by: Shailesh Parmar <shailesh.parmar.webdev@gmail.com>
This commit is contained in:
parent
324a428ec3
commit
1301b09e36
@ -140,11 +140,29 @@ export const handleIngestionRetry = (
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const scheduleIngestion = () => {
|
export const scheduleIngestion = () => {
|
||||||
|
interceptURL(
|
||||||
|
'POST',
|
||||||
|
'/api/v1/services/ingestionPipelines',
|
||||||
|
'createIngestionPipelines'
|
||||||
|
);
|
||||||
|
interceptURL(
|
||||||
|
'POST',
|
||||||
|
'/api/v1/services/ingestionPipelines/deploy/*',
|
||||||
|
'deployPipeline'
|
||||||
|
);
|
||||||
|
interceptURL(
|
||||||
|
'GET',
|
||||||
|
'/api/v1/services/ingestionPipelines/status',
|
||||||
|
'getIngestionPipelineStatus'
|
||||||
|
);
|
||||||
// Schedule & Deploy
|
// Schedule & Deploy
|
||||||
cy.get('[data-testid="cron-type"]').should('be.visible').click();
|
cy.get('[data-testid="cron-type"]').should('be.visible').click();
|
||||||
cy.get('.ant-select-item-option-content').contains('Hour').click();
|
cy.get('.ant-select-item-option-content').contains('Hour').click();
|
||||||
cy.get('[data-testid="deploy-button"]').should('be.visible').click();
|
cy.get('[data-testid="deploy-button"]').should('be.visible').click();
|
||||||
|
|
||||||
|
verifyResponseStatusCode('@createIngestionPipelines', 201);
|
||||||
|
verifyResponseStatusCode('@deployPipeline', 200);
|
||||||
|
verifyResponseStatusCode('@getIngestionPipelineStatus', 200);
|
||||||
// check success
|
// check success
|
||||||
cy.get('[data-testid="success-line"]', { timeout: 15000 }).should(
|
cy.get('[data-testid="success-line"]', { timeout: 15000 }).should(
|
||||||
'be.visible'
|
'be.visible'
|
||||||
@ -233,11 +251,6 @@ export const testServiceCreationAndIngestion = (
|
|||||||
'/api/v1/services/ingestionPipelines/status',
|
'/api/v1/services/ingestionPipelines/status',
|
||||||
'getIngestionPipelineStatus'
|
'getIngestionPipelineStatus'
|
||||||
);
|
);
|
||||||
interceptURL(
|
|
||||||
'POST',
|
|
||||||
'/api/v1/services/ingestionPipelines/deploy/*',
|
|
||||||
'deployPipeline'
|
|
||||||
);
|
|
||||||
cy.get('[data-testid="submit-btn"]').should('exist').click();
|
cy.get('[data-testid="submit-btn"]').should('exist').click();
|
||||||
verifyResponseStatusCode('@getIngestionPipelineStatus', 200);
|
verifyResponseStatusCode('@getIngestionPipelineStatus', 200);
|
||||||
// check success
|
// check success
|
||||||
@ -268,8 +281,6 @@ export const testServiceCreationAndIngestion = (
|
|||||||
|
|
||||||
scheduleIngestion();
|
scheduleIngestion();
|
||||||
|
|
||||||
verifyResponseStatusCode('@deployPipeline', 200);
|
|
||||||
|
|
||||||
cy.contains(`${serviceName}_metadata`).should('be.visible');
|
cy.contains(`${serviceName}_metadata`).should('be.visible');
|
||||||
|
|
||||||
// wait for ingestion to run
|
// wait for ingestion to run
|
||||||
|
@ -131,6 +131,8 @@ describe('Postgres Ingestion', () => {
|
|||||||
'ingestionPermissions'
|
'ingestionPermissions'
|
||||||
);
|
);
|
||||||
interceptURL('GET', '/api/v1/services/*/name/*', 'serviceDetails');
|
interceptURL('GET', '/api/v1/services/*/name/*', 'serviceDetails');
|
||||||
|
interceptURL('GET', `/api/v1/*`, 'database');
|
||||||
|
|
||||||
cy.get(`[data-testid="service-name-${serviceName}"]`)
|
cy.get(`[data-testid="service-name-${serviceName}"]`)
|
||||||
.should('exist')
|
.should('exist')
|
||||||
.click();
|
.click();
|
||||||
@ -139,6 +141,8 @@ describe('Postgres Ingestion', () => {
|
|||||||
});
|
});
|
||||||
verifyResponseStatusCode('@serviceDetails', 200);
|
verifyResponseStatusCode('@serviceDetails', 200);
|
||||||
verifyResponseStatusCode('@airflow', 200);
|
verifyResponseStatusCode('@airflow', 200);
|
||||||
|
verifyResponseStatusCode('@database', 200);
|
||||||
|
|
||||||
cy.get('[data-testid="tabs"]').should('exist');
|
cy.get('[data-testid="tabs"]').should('exist');
|
||||||
cy.get('[data-testid="Ingestions"]')
|
cy.get('[data-testid="Ingestions"]')
|
||||||
.scrollIntoView()
|
.scrollIntoView()
|
||||||
|
@ -97,6 +97,11 @@ describe('RedShift Ingestion', () => {
|
|||||||
'/api/v1/services/ingestionPipelines/deploy/*',
|
'/api/v1/services/ingestionPipelines/deploy/*',
|
||||||
'deployIngestion'
|
'deployIngestion'
|
||||||
);
|
);
|
||||||
|
interceptURL(
|
||||||
|
'GET',
|
||||||
|
'/api/v1/services/ingestionPipelines/*/pipelineStatus?startTs=*&endTs=*',
|
||||||
|
'pipelineStatus'
|
||||||
|
);
|
||||||
cy.get('[data-testid="appbar-item-settings"]')
|
cy.get('[data-testid="appbar-item-settings"]')
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.click({ force: true });
|
.click({ force: true });
|
||||||
@ -140,12 +145,18 @@ describe('RedShift Ingestion', () => {
|
|||||||
.scrollIntoView()
|
.scrollIntoView()
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.click();
|
.click();
|
||||||
|
|
||||||
|
verifyResponseStatusCode('@pipelineStatus', 200);
|
||||||
verifyResponseStatusCode('@ingestionPermissions', 200);
|
verifyResponseStatusCode('@ingestionPermissions', 200);
|
||||||
|
|
||||||
cy.get('[data-testid="ingestion-details-container"]').should('exist');
|
cy.get('[data-testid="ingestion-details-container"]').should('exist');
|
||||||
cy.get('[data-testid="add-new-ingestion-button"]')
|
cy.get('[data-testid="add-new-ingestion-button"]')
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.click();
|
.click();
|
||||||
cy.get('[data-testid="list-item"]').contains('Add dbt Ingestion').click();
|
cy.get('[data-testid="list-item"]').contains('Add dbt Ingestion').click();
|
||||||
|
|
||||||
|
verifyResponseStatusCode('@getServices', 200);
|
||||||
|
|
||||||
// Add DBT ingestion
|
// Add DBT ingestion
|
||||||
cy.contains('Add dbt Ingestion').should('be.visible');
|
cy.contains('Add dbt Ingestion').should('be.visible');
|
||||||
cy.get('[data-testid="dbt-source"]').should('be.visible').click();
|
cy.get('[data-testid="dbt-source"]').should('be.visible').click();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user