Skip to content

Commit

Permalink
[APM] Revert skip for flaky Tests (#160391)
Browse files Browse the repository at this point in the history
## Summary

Closes
- #120056
- #122001
- #127431
- #127416


## Flakiness Testing

Changes in the PR were tested with the flaky test runner, running 50
times for all 5 configs for APM
1. 4 config (Trial, Basic, Cloud and Rules) present inside
`apm_api_integration` folder and
2. 1 config present inside `functional/apps/apm`

https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2499
  • Loading branch information
achyutjhunjhunwala authored Jun 28, 2023
1 parent 036a736 commit 384cf78
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 25 deletions.
5 changes: 0 additions & 5 deletions test/functional/page_objects/time_picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,10 @@ export class TimePickerPageObject extends FtrService {
}
this.log.debug(`Setting absolute range to ${fromTime} to ${toTime}`);
await this.showStartEndTimes();
let panel!: WebElementWrapper;

// set to time
await this.retry.waitFor(`endDate is set to ${toTime}`, async () => {
await this.testSubjects.click('superDatePickerendDatePopoverButton');
panel = await this.getTimePickerPanel();
await this.testSubjects.click('superDatePickerAbsoluteTab');
await this.testSubjects.click('superDatePickerAbsoluteDateInput');
await this.inputValue('superDatePickerAbsoluteDateInput', toTime);
Expand All @@ -164,8 +162,6 @@ export class TimePickerPageObject extends FtrService {
// set from time
await this.retry.waitFor(`startDate is set to ${fromTime}`, async () => {
await this.testSubjects.click('superDatePickerstartDatePopoverButton');
await this.waitPanelIsGone(panel);
panel = await this.getTimePickerPanel();
await this.testSubjects.click('superDatePickerAbsoluteTab');
await this.testSubjects.click('superDatePickerAbsoluteDateInput');
await this.inputValue('superDatePickerAbsoluteDateInput', fromTime);
Expand Down Expand Up @@ -196,7 +192,6 @@ export class TimePickerPageObject extends FtrService {
await this.testSubjects.click('querySubmitButton');
}

await this.waitPanelIsGone(panel);
await this.header.awaitGlobalLoadingIndicatorHidden();
}

Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/apm/dev_docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ TODO: We could try moving this tests to the new e2e tests located at `x-pack/plu
**Start server**

```
node scripts/functional_tests_server --config x-pack/test/functional/config.base.js
node scripts/functional_tests_server --config x-pack/test/functional/apps/apm/config.ts
```

**Run tests**

```
node scripts/functional_test_runner --config x-pack/test/functional/config.base.js --grep='APM specs'
node scripts/functional_test_runner --config x-pack/test/functional/apps/apm/config.ts --grep='APM specs'
```

APM tests are located in `x-pack/test/functional/apps/apm`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
const es = getService('es');

const synthtraceEsClient = getService('synthtraceEsClient');

// FAILING VERSION BUMP: https://github.com/elastic/kibana/issues/155930
// FLAKY https://github.com/elastic/kibana/issues/160298
registry.when.skip(
'fetching service anomalies with a trial license',
{ config: 'trial', archives: [] },
Expand Down
3 changes: 1 addition & 2 deletions x-pack/test/apm_api_integration/tests/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ function getGlobPattern() {
export default function apmApiIntegrationTests({ getService, loadTestFile }: FtrProviderContext) {
const registry = getService('registry');

// FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/160298
describe.skip('APM API tests', function () {
describe('APM API tests', function () {
const filePattern = getGlobPattern();
const tests = globby.sync(filePattern, { cwd });

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@ export default function ApiTest({ getService }: FtrProviderContext) {
}
);

// FLAKY: https://github.com/elastic/kibana/issues/120056
registry.when.skip(
registry.when(
'Instance details when data is loaded',
{ config: 'basic', archives: [archiveName] },
() => {
describe.skip('fetch instance details', () => {
describe('fetch instance details', () => {
let response: {
status: number;
body: ServiceOverviewInstanceDetails;
Expand All @@ -70,7 +69,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
endpoint:
'GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}',
params: {
path: { serviceName: 'opbeans-node', serviceNodeName: serviceNodeIds[0] },
path: { serviceName: 'opbeans-java', serviceNodeName: serviceNodeIds[0] },
query: {
start,
end,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
};

describe('failed transactions correlations', () => {
// FLAKY: https://github.com/elastic/kibana/issues/127416
describe.skip('space with no features disabled', () => {
describe('space with no features disabled', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/infra/8.0.0/metrics_and_apm');
await spacesService.create({
Expand Down Expand Up @@ -64,7 +63,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

const fromTime = 'Jul 29, 2019 @ 00:00:00.000';
const toTime = 'Jul 30, 2019 @ 00:00:00.000';
await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime);
await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime, true);

await retry.try(async () => {
const apmMainContainerText = await testSubjects.getVisibleTextAll('apmMainContainer');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
};

describe('latency correlations', () => {
// FLAKY: https://github.com/elastic/kibana/issues/127431
describe.skip('space with no features disabled', () => {
describe('space with no features disabled', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/infra/8.0.0/metrics_and_apm');
await spacesService.delete('custom_space');
await spacesService.create({
id: 'custom_space',
name: 'custom_space',
Expand Down Expand Up @@ -65,7 +65,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

const fromTime = 'Jul 29, 2019 @ 00:00:00.000';
const toTime = 'Jul 30, 2019 @ 00:00:00.000';
await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime);
await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime, true);

await retry.try(async () => {
const apmMainContainerText = await testSubjects.getVisibleTextAll('apmMainContainer');
Expand Down Expand Up @@ -121,7 +121,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
// The default tab 'Trace samples' should show the log log chart without the correlations analysis part.
// First assert that the log log chart and its header are present
const apmTransactionDistributionChartTitle = await testSubjects.getVisibleText(
'apmTransactionDistributionChartTitle'
'apmDurationDistributionChartWithScrubberTitle'
);
expect(apmTransactionDistributionChartTitle).to.be(testData.logLogChartTitle);
await testSubjects.existOrFail('apmCorrelationsChart');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});
});

// FLAKY: https://github.com/elastic/kibana/issues/122001
describe.skip('no apm privileges', () => {
describe('no apm privileges', () => {
before(async () => {
await security.role.create('no_apm_privileges_role', {
elasticsearch: {
Expand Down

0 comments on commit 384cf78

Please sign in to comment.