Skip to content

Commit 72acec1

Browse files
committed
return parallelism and updates for live recommendations
1 parent 0bec784 commit 72acec1

File tree

6 files changed

+38
-20
lines changed

6 files changed

+38
-20
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ workflows:
10141014
- e2e-tests:
10151015
name: E2ETest
10161016
build: docker
1017-
parallelism: 1
1017+
parallelism: 4
10181018
requires:
10191019
- Build docker image
10201020
# Workflow for feature, bugfix, main branches

tests/e2e/.desktop.env

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,4 @@ NOTIFICATION_UPDATE_URL=https://s3.amazonaws.com/redisinsight.test/public/tests/
2828
NOTIFICATION_SYNC_INTERVAL=30000
2929

3030
RI_FEATURES_CONFIG_URL=http://localhost:5551/remote/features-config.json
31-
RI_FEATURES_CONFIG_SYNC_INTERVAL=5000
32-
REMOTE_FOLDER_PATH=./remote
31+
RI_FEATURES_CONFIG_SYNC_INTERVAL=50000

tests/e2e/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ APP_FOLDER_NAME=.redisinsight-v2
55
NOTIFICATION_UPDATE_URL=https://s3.amazonaws.com/redisinsight.test/public/tests/e2e/notifications.json
66
NOTIFICATION_SYNC_INTERVAL=30000
77
RI_FEATURES_CONFIG_URL=http://static-server:5551/remote/features-config.json
8-
RI_FEATURES_CONFIG_SYNC_INTERVAL=5000
8+
RI_FEATURES_CONFIG_SYNC_INTERVAL=50000

tests/e2e/helpers/insights.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export async function modifyFeaturesConfigJson(filePath: string): Promise<void>
1919
try {
2020
fs.ensureFileSync(targetFilePath);
2121
fs.writeFileSync(targetFilePath, fs.readFileSync(filePath));
22-
console.log(`Features config modified: ${fs.readFileSync(targetFilePath)}`);
2322
resolve();
2423
}
2524
catch (err) {

tests/e2e/tests/regression/insights/feature-flag.e2e.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const pathes = {
2828
electronConfig: path.join('.', 'test-data', 'features-configs', 'insights-electron-build.json')
2929
};
3030

31-
fixture.only `Feature flag`
31+
fixture `Feature flag`
3232
.meta({ type: 'regression', rte: rte.standalone })
3333
.page(commonUrl)
3434
.beforeEach(async() => {
@@ -77,8 +77,6 @@ test
7777
// Update remote config .json to valid
7878
await modifyFeaturesConfigJson(pathes.validConfig);
7979
await updateControlNumber(48.2);
80-
await console.log(await getColumnValueFromTableInDB(featuresConfigTable, 'data'));
81-
await console.log(await getColumnValueFromTableInDB(featuresConfigTable, 'controlNumber'));
8280
let featureVersion = await JSON.parse(await getColumnValueFromTableInDB(featuresConfigTable, 'data')).version;
8381
let versionFromConfig = await Common.getJsonPropertyValue('version', pathes.validConfig);
8482

tests/e2e/tests/regression/insights/live-recommendations.e2e.ts

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { BrowserPage, MemoryEfficiencyPage, MyRedisDatabasePage, SettingsPage, WorkbenchPage } from '../../../pageObjects';
2-
import { RecommendationIds, rte, env } from '../../../helpers/constants';
1+
import * as path from 'path';
2+
import { BrowserPage, MemoryEfficiencyPage, MyRedisDatabasePage, WorkbenchPage } from '../../../pageObjects';
3+
import { RecommendationIds, rte } from '../../../helpers/constants';
34
import { acceptLicenseTerms, acceptLicenseTermsAndAddDatabaseApi } from '../../../helpers/database';
45
import { commonUrl, ossStandaloneConfig, ossStandaloneV5Config } from '../../../helpers/conf';
56
import {
@@ -10,6 +11,7 @@ import {
1011
import { Common } from '../../../helpers/common';
1112
import { Telemetry } from '../../../helpers/telemetry';
1213
import { RecommendationsActions } from '../../../common-actions/recommendations-actions';
14+
import { modifyFeaturesConfigJson, refreshFeaturesTestData, updateControlNumber } from '../../../helpers/insights';
1315

1416
const myRedisDatabasePage = new MyRedisDatabasePage();
1517
const browserPage = new BrowserPage();
@@ -33,36 +35,45 @@ const expectedProperties = [
3335
'provider',
3436
'vote'
3537
];
38+
const featuresConfig = path.join('.', 'test-data', 'features-configs', 'insights-analytics-filter-off.json');
3639
const redisVersionRecom = RecommendationIds.redisVersion;
3740
const redisTimeSeriesRecom = RecommendationIds.optimizeTimeSeries;
3841
const searchVisualizationRecom = RecommendationIds.searchVisualization;
3942
const setPasswordRecom = RecommendationIds.setPassword;
4043

41-
fixture`Live Recommendations`
44+
fixture `Live Recommendations`
4245
.meta({ type: 'regression', rte: rte.standalone })
4346
.page(commonUrl)
44-
.beforeEach(async () => {
47+
.beforeEach(async() => {
4548
await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneConfig, ossStandaloneConfig.databaseName);
49+
await refreshFeaturesTestData();
50+
await modifyFeaturesConfigJson(featuresConfig);
51+
await updateControlNumber(47.2);
4652
})
47-
.afterEach(async () => {
53+
.afterEach(async() => {
4854
// Delete database
4955
await deleteStandaloneDatabaseApi(ossStandaloneConfig);
56+
await refreshFeaturesTestData();
5057
});
5158
test
52-
.before(async () => {
59+
.before(async() => {
5360
// Add new databases using API
5461
await acceptLicenseTerms();
5562
await addNewStandaloneDatabasesApi(databasesForAdding);
5663
// Reload Page
5764
await myRedisDatabasePage.reloadPage();
5865
await myRedisDatabasePage.clickOnDBByName(databasesForAdding[1].databaseName);
66+
await refreshFeaturesTestData();
67+
await modifyFeaturesConfigJson(featuresConfig);
68+
await updateControlNumber(47.2);
5969
})
60-
.after(async () => {
70+
.after(async() => {
6171
// Clear and delete database
6272
await browserPage.InsightsPanel.toggleInsightsPanel(false);
6373
await browserPage.OverviewPanel.changeDbIndex(0);
6474
await browserPage.deleteKeyByName(keyName);
6575
await deleteStandaloneDatabasesApi(databasesForAdding);
76+
await refreshFeaturesTestData();
6677
})('Verify Insights panel Recommendations displaying', async t => {
6778
await browserPage.InsightsPanel.toggleInsightsPanel(true);
6879
// Verify that "Welcome to recommendations" panel displayed when there are no recommendations
@@ -92,10 +103,14 @@ test
92103
});
93104
test
94105
.requestHooks(logger)
95-
.before(async () => {
106+
.before(async() => {
96107
await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneV5Config, ossStandaloneV5Config.databaseName);
97-
}).after(async () => {
108+
await refreshFeaturesTestData();
109+
await modifyFeaturesConfigJson(featuresConfig);
110+
await updateControlNumber(47.2);
111+
}).after(async() => {
98112
await deleteStandaloneDatabaseApi(ossStandaloneV5Config);
113+
await refreshFeaturesTestData();
99114
})('Verify that user can upvote recommendations', async() => {
100115
const notUsefulVoteOption = 'not useful';
101116
const usefulVoteOption = 'useful';
@@ -165,10 +180,14 @@ test('Verify that user can snooze recommendation', async t => {
165180
await t.expect(await browserPage.InsightsPanel.getRecommendationByName(searchVisualizationRecom).visible).ok('recommendation is not displayed again');
166181
});
167182
test
168-
.before(async () => {
183+
.before(async() => {
169184
await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneV5Config, ossStandaloneV5Config.databaseName);
170-
}).after(async () => {
185+
await refreshFeaturesTestData();
186+
await modifyFeaturesConfigJson(featuresConfig);
187+
await updateControlNumber(47.2);
188+
}).after(async() => {
171189
await deleteStandaloneDatabaseApi(ossStandaloneV5Config);
190+
await refreshFeaturesTestData();
172191
})('Verify that recommendations from database analysis are displayed in Insight panel above live recommendations', async t => {
173192
const redisVersionRecomSelector = browserPage.InsightsPanel.getRecommendationByName(redisVersionRecom);
174193

@@ -205,9 +224,12 @@ test('Verify that if user clicks on the Analyze button and link, the pop up with
205224
});
206225
//https://redislabs.atlassian.net/browse/RI-4493
207226
test
208-
.after(async () => {
227+
.after(async() => {
209228
await browserPage.deleteKeyByName(keyName);
210229
await deleteStandaloneDatabasesApi(databasesForAdding);
230+
await refreshFeaturesTestData();
231+
await modifyFeaturesConfigJson(featuresConfig);
232+
await updateControlNumber(47.2);
211233
})('Verify that key name is displayed for Insights and DA recommendations', async t => {
212234
const cliCommand = `JSON.SET ${keyName} $ '{ "model": "Hyperion", "brand": "Velorim"}'`;
213235
await browserPage.Cli.sendCommandInCli(cliCommand);

0 commit comments

Comments
 (0)