Skip to content

Commit

Permalink
Use static time for tsvb rollup test (#57701) (#58099)
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed Feb 20, 2020
1 parent 3508f12 commit a1bf7d4
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions x-pack/test/functional/apps/rollup_job/tsvb.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
* you may not use this file except in compliance with the Elastic License.
*/

import datemath from '@elastic/datemath';
import expect from '@kbn/expect';
import mockRolledUpData from './hybrid_index_helper';

export default function({ getService, getPageObjects }) {
const es = getService('legacyEs');
const esArchiver = getService('esArchiver');
const retry = getService('retry');
const testSubjects = getService('testSubjects');
const PageObjects = getPageObjects([
'common',
'settings',
Expand All @@ -21,18 +19,16 @@ export default function({ getService, getPageObjects }) {
'timePicker',
]);

// FLAKY: https://github.com/elastic/kibana/issues/56816
describe.skip('tsvb integration', function() {
describe('tsvb integration', function() {
//Since rollups can only be created once with the same name (even if you delete it),
//we add the Date.now() to avoid name collision if you run the tests locally back to back.
const rollupJobName = `tsvb-test-rollup-job-${Date.now()}`;
const rollupSourceIndexName = 'rollup-source-data';
const rollupTargetIndexName = `rollup-target-data`;
const now = new Date();
const pastDates = [
datemath.parse('now-1m', { forceNow: now }),
datemath.parse('now-2m', { forceNow: now }),
datemath.parse('now-3m', { forceNow: now }),
new Date('October 15, 2019 05:35:32'),
new Date('October 15, 2019 05:34:32'),
new Date('October 15, 2019 05:33:32'),
];

before(async () => {
Expand Down Expand Up @@ -78,10 +74,12 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.navigateToNewVisualization();
await PageObjects.visualize.clickVisualBuilder();
await PageObjects.visualBuilder.checkVisualBuilderIsPresent();
await PageObjects.timePicker.openQuickSelectTimeMenu();
await testSubjects.click('superDatePickerCommonlyUsed_Last_24 hours');
await PageObjects.visualBuilder.clickMetric();
await PageObjects.visualBuilder.checkMetricTabIsPresent();
await PageObjects.timePicker.setAbsoluteRange(
'Oct 15, 2019 @ 00:00:01.000',
'Oct 15, 2019 @ 19:31:44.000'
);
await PageObjects.visualBuilder.clickPanelOptions('metric');
await PageObjects.visualBuilder.setIndexPatternValue(rollupTargetIndexName);
await PageObjects.visualBuilder.setIntervalValue('1d');
Expand Down

0 comments on commit a1bf7d4

Please sign in to comment.