Skip to content

Commit c5f565f

Browse files
committed
Use static time for tsvb rollup test (elastic#57701)
1 parent b7251d5 commit c5f565f

File tree

1 file changed

+8
-10
lines changed
  • x-pack/test/functional/apps/rollup_job

1 file changed

+8
-10
lines changed

x-pack/test/functional/apps/rollup_job/tsvb.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
import datemath from '@elastic/datemath';
87
import expect from '@kbn/expect';
98
import mockRolledUpData from './hybrid_index_helper';
109

1110
export default function({ getService, getPageObjects }) {
1211
const es = getService('legacyEs');
1312
const esArchiver = getService('esArchiver');
1413
const retry = getService('retry');
15-
const testSubjects = getService('testSubjects');
1614
const PageObjects = getPageObjects([
1715
'common',
1816
'settings',
@@ -21,18 +19,16 @@ export default function({ getService, getPageObjects }) {
2119
'timePicker',
2220
]);
2321

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

3834
before(async () => {
@@ -78,10 +74,12 @@ export default function({ getService, getPageObjects }) {
7874
await PageObjects.visualize.navigateToNewVisualization();
7975
await PageObjects.visualize.clickVisualBuilder();
8076
await PageObjects.visualBuilder.checkVisualBuilderIsPresent();
81-
await PageObjects.timePicker.openQuickSelectTimeMenu();
82-
await testSubjects.click('superDatePickerCommonlyUsed_Last_24 hours');
8377
await PageObjects.visualBuilder.clickMetric();
8478
await PageObjects.visualBuilder.checkMetricTabIsPresent();
79+
await PageObjects.timePicker.setAbsoluteRange(
80+
'Oct 15, 2019 @ 00:00:01.000',
81+
'Oct 15, 2019 @ 19:31:44.000'
82+
);
8583
await PageObjects.visualBuilder.clickPanelOptions('metric');
8684
await PageObjects.visualBuilder.setIndexPatternValue(rollupTargetIndexName);
8785
await PageObjects.visualBuilder.setIntervalValue('1d');

0 commit comments

Comments
 (0)