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

PMM-7 improve pgsm failures debugging #681

Merged
merged 7 commits into from
Sep 13, 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
1 change: 1 addition & 0 deletions tests/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"warn",
{
"code": 130,
"ignoreComments": true,
"ignoreRegExpLiterals": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
Expand Down
5 changes: 4 additions & 1 deletion tests/DbaaS/verifyDBaaS_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,10 @@ Data(nameFields).Scenario(
I.dontSee(dbaasPage.dbclusterNameLimitError, dbaasPage.tabs.dbClusterTab.basicOptions.fields.clusterNameFieldErrorMessage);
adminPage.customClearField(current.field);
I.fillField(dbaasPage.tabs.dbClusterTab.basicOptions.fields.clusterNameField, 'a23456789012345678901');
I.seeTextEquals(dbaasPage.dbclusterNameLimitError, dbaasPage.tabs.dbClusterTab.basicOptions.fields.clusterNameFieldErrorMessage);
I.seeTextEquals(
dbaasPage.dbclusterNameLimitError,
dbaasPage.tabs.dbClusterTab.basicOptions.fields.clusterNameFieldErrorMessage,
);
current.value.forEach((input) => dbaasPage.verifyInputValidationMessages(
current.field,
input,
Expand Down
2 changes: 1 addition & 1 deletion tests/QAN/details_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Scenario(
Scenario(
'PMM-T144 Verify that Details tab is the only one available when total row is selected @qan',
async ({
I, qanPage, searchDashboardsModal, qanOverview, qanDetails,
I, qanPage, qanOverview, qanDetails,
}) => {
qanPage.waitForOpened();
qanOverview.waitForOverviewLoaded();
Expand Down
22 changes: 20 additions & 2 deletions tests/qa-integration/pmm_pgsm_integration_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ Scenario(

await I.say(`query is : ${query}`);

if (!response.data.metrics) {
throw new Error(`there are no metrics stored in clickhouse for query
"${query}"
Full resp:
"${JSON.stringify(response.data)}"
`);
}

const clickhouse_sum = parseFloat((response.data.metrics.query_time.sum).toFixed(7));
const clickhouse_avg = parseFloat((response.data.metrics.query_time.avg).toFixed(7));

Expand All @@ -139,7 +147,7 @@ Scenario(
assert.ok(response.data.metrics.query_time.cnt === query_cnt, `Expected Total Query Count Metrics to be same for query ${query} with id as ${queryid} found in clickhouse as ${response.data.metrics.query_time.cnt} while pgsm has value as ${query_cnt}`);
}
},
).retry(1);
).retry(2);

Data(filters).Scenario(
'PMM-T1261 - Verify the "Command type" filter for Postgres @not-ui-pipeline @pgsm-pmm-integration',
Expand Down Expand Up @@ -298,6 +306,16 @@ Scenario(
assert.fail(`Expected queryid with id as ${queryid} and query as ${query} to have data in clickhouse but got response as ${response.status}. ${JSON.stringify(response.data)}}`);
}

await I.say(`query is : ${query}`);

if (!response.data.metrics) {
throw new Error(`there are no metrics stored in clickhouse for query
"${query}"
Full resp:
"${JSON.stringify(response.data)}"
`);
}

const clickhouse_sum = parseFloat((response.data.metrics.query_time.sum).toFixed(7));
const clickhouse_avg = parseFloat((response.data.metrics.query_time.avg).toFixed(7));

Expand All @@ -316,7 +334,7 @@ Scenario(
assert.ok(response.data.metrics.query_time.cnt === query_cnt, `Expected Total Query Count Metrics to be same for query ${query} with id as ${queryid} found in clickhouse as ${response.data.metrics.query_time.cnt} while pgsm has value as ${query_cnt}`);
}
},
).retry(1);
).retry(2);

Scenario(
'PMM-T1063 - Verify Application Name with pg_stat_monitor @pgsm-pmm-integration @not-ui-pipeline',
Expand Down
Loading