Skip to content

Commit

Permalink
PMM-7 improve pgsm failures debugging (#681)
Browse files Browse the repository at this point in the history
* PMM-7 debug pgsm failures

* PMM-7 remove only

* PMM-7 default scrape size test

* PMM-7 fix warns in GH

* PMM-7 add one more retry for pgsm tests
  • Loading branch information
yurkovychv authored Sep 13, 2023
1 parent aa9e22b commit b845fe9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
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

0 comments on commit b845fe9

Please sign in to comment.