mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-30 11:56:01 +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 = () => {
|
||||
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
|
||||
cy.get('[data-testid="cron-type"]').should('be.visible').click();
|
||||
cy.get('.ant-select-item-option-content').contains('Hour').click();
|
||||
cy.get('[data-testid="deploy-button"]').should('be.visible').click();
|
||||
|
||||
verifyResponseStatusCode('@createIngestionPipelines', 201);
|
||||
verifyResponseStatusCode('@deployPipeline', 200);
|
||||
verifyResponseStatusCode('@getIngestionPipelineStatus', 200);
|
||||
// check success
|
||||
cy.get('[data-testid="success-line"]', { timeout: 15000 }).should(
|
||||
'be.visible'
|
||||
@ -233,11 +251,6 @@ export const testServiceCreationAndIngestion = (
|
||||
'/api/v1/services/ingestionPipelines/status',
|
||||
'getIngestionPipelineStatus'
|
||||
);
|
||||
interceptURL(
|
||||
'POST',
|
||||
'/api/v1/services/ingestionPipelines/deploy/*',
|
||||
'deployPipeline'
|
||||
);
|
||||
cy.get('[data-testid="submit-btn"]').should('exist').click();
|
||||
verifyResponseStatusCode('@getIngestionPipelineStatus', 200);
|
||||
// check success
|
||||
@ -268,8 +281,6 @@ export const testServiceCreationAndIngestion = (
|
||||
|
||||
scheduleIngestion();
|
||||
|
||||
verifyResponseStatusCode('@deployPipeline', 200);
|
||||
|
||||
cy.contains(`${serviceName}_metadata`).should('be.visible');
|
||||
|
||||
// wait for ingestion to run
|
||||
|
@ -131,6 +131,8 @@ describe('Postgres Ingestion', () => {
|
||||
'ingestionPermissions'
|
||||
);
|
||||
interceptURL('GET', '/api/v1/services/*/name/*', 'serviceDetails');
|
||||
interceptURL('GET', `/api/v1/*`, 'database');
|
||||
|
||||
cy.get(`[data-testid="service-name-${serviceName}"]`)
|
||||
.should('exist')
|
||||
.click();
|
||||
@ -139,6 +141,8 @@ describe('Postgres Ingestion', () => {
|
||||
});
|
||||
verifyResponseStatusCode('@serviceDetails', 200);
|
||||
verifyResponseStatusCode('@airflow', 200);
|
||||
verifyResponseStatusCode('@database', 200);
|
||||
|
||||
cy.get('[data-testid="tabs"]').should('exist');
|
||||
cy.get('[data-testid="Ingestions"]')
|
||||
.scrollIntoView()
|
||||
|
@ -97,6 +97,11 @@ describe('RedShift Ingestion', () => {
|
||||
'/api/v1/services/ingestionPipelines/deploy/*',
|
||||
'deployIngestion'
|
||||
);
|
||||
interceptURL(
|
||||
'GET',
|
||||
'/api/v1/services/ingestionPipelines/*/pipelineStatus?startTs=*&endTs=*',
|
||||
'pipelineStatus'
|
||||
);
|
||||
cy.get('[data-testid="appbar-item-settings"]')
|
||||
.should('be.visible')
|
||||
.click({ force: true });
|
||||
@ -140,12 +145,18 @@ describe('RedShift Ingestion', () => {
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
verifyResponseStatusCode('@pipelineStatus', 200);
|
||||
verifyResponseStatusCode('@ingestionPermissions', 200);
|
||||
|
||||
cy.get('[data-testid="ingestion-details-container"]').should('exist');
|
||||
cy.get('[data-testid="add-new-ingestion-button"]')
|
||||
.should('be.visible')
|
||||
.click();
|
||||
cy.get('[data-testid="list-item"]').contains('Add dbt Ingestion').click();
|
||||
|
||||
verifyResponseStatusCode('@getServices', 200);
|
||||
|
||||
// Add DBT ingestion
|
||||
cy.contains('Add dbt Ingestion').should('be.visible');
|
||||
cy.get('[data-testid="dbt-source"]').should('be.visible').click();
|
||||
|
Loading…
x
Reference in New Issue
Block a user