Skip to content

Commit 0927d4a

Browse files
authored
Merge pull request #191 from RedisInsight/e2e/bugfix/e2e-fix
add circleci parallelism to e2e
2 parents 4fc6d79 + 499bbb9 commit 0927d4a

36 files changed

+74
-53
lines changed

.circleci/config.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ executors:
4848
machine:
4949
image: ubuntu-2004:2023.04.2
5050
docker_layer_caching: true
51-
environment:
52-
DISPLAY: ":99"
5351
docker-node:
5452
docker:
5553
- image: cimg/node:20.15
@@ -91,7 +89,7 @@ jobs:
9189
paths:
9290
- ~/.cache/yarn
9391

94-
e2e-app-image:
92+
e2e-linux:
9593
executor: linux-executor-dlc
9694
parameters:
9795
report:
@@ -116,10 +114,22 @@ jobs:
116114
command: |
117115
sudo apt-get install -y xvfb
118116
Xvfb :99 -screen 0 1920x1080x24 &
117+
- run:
118+
name: Install dependencies
119+
command: cd tests/e2e && yarn install
120+
- run:
121+
name: Compile TypeScript
122+
command: cd tests/e2e && yarn compile
123+
- run:
124+
name: Verify Compiled Files
125+
command: ls -R tests/e2e/dist/tests/
119126
- run:
120127
name: Run e2e tests
121128
command: |
122-
cd tests/e2e && export TEST_FILES=$(circleci tests glob "tests/**/*.e2e.ts" | circleci tests split --split-by=timings) && cd ../..
129+
cd tests/e2e/dist
130+
export TEST_FILES=$(circleci tests glob "tests/**/*.e2e.js" | circleci tests split --split-by=timings)
131+
echo "Running tests: $TEST_FILES"
132+
cd ../../..
123133
.circleci/e2e/test.app.sh
124134
- when:
125135
condition:
@@ -402,7 +412,7 @@ workflows:
402412
requires:
403413
- Start E2E Tests
404414

405-
- e2e-app-image:
415+
- e2e-linux:
406416
name: E2ETest (linux)
407417
parallelism: 2
408418
requires:
@@ -511,7 +521,7 @@ workflows:
511521
name: Build extension - Windows (stage)
512522
<<: *stageFilter
513523
# e2e tests on linux build
514-
- e2e-app-image:
524+
- e2e-linux:
515525
name: E2ETest (linux)
516526
parallelism: 2
517527
requires:
@@ -549,7 +559,7 @@ workflows:
549559
<<: *prodFilter
550560

551561
# e2e tests on linux build
552-
- e2e-app-image:
562+
- e2e-linux:
553563
name: E2ETest (Linux)
554564
parallelism: 2
555565
requires:

.circleci/e2e/test.app.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
#!/bin/bash
22
set -e
33

4-
yarn --cwd tests/e2e install
5-
6-
# create folder before tests run to prevent permissions issue
4+
# Create folder before tests run to prevent permissions issues
75
mkdir -p tests/e2e/remote
86

9-
# run rte
7+
# Run RTE (Redis Test Environment)
108
docker-compose -f tests/e2e/rte.docker-compose.yml build
119
docker-compose -f tests/e2e/rte.docker-compose.yml up --force-recreate -d -V
12-
./tests/e2e/wait-for-redis.sh localhost 12000 && \
10+
./tests/e2e/wait-for-redis.sh localhost 12000
1311

14-
# run tests
12+
# Run tests
1513
RI_SOCKETS_CORS=true \
1614
yarn --cwd tests/e2e dotenv -e .ci.env yarn --cwd tests/e2e test:ci

tests/e2e/.ci.env

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
COMMON_URL=http://localhost:5541
21
API_URL=http://127.0.0.1:5541/api
32
OSS_SENTINEL_PASSWORD=password
43
RI_APP_FOLDER_NAME=.redis-for-vscode-stage

tests/e2e/.mocharc.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ module.exports = {
44
color: true,
55
delay: false,
66
diff: true,
7-
file: ['./tests/setup.js'],
87
package: './package.json',
98
parallel: false,
109
recursive: false,
@@ -20,7 +19,7 @@ module.exports = {
2019
toConsole: false,
2120
},
2221
},
23-
retries: 1,
22+
retries: 3,
2423
timeout: 100_000,
2524
ui: 'bdd',
2625
}

tests/e2e/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"ts-node": "10.9.1",
4444
"tsc-alias": "^1.8.8",
4545
"typescript": "^5.1.3",
46-
"vscode-extension-tester": "^8.5.0"
46+
"vscode-extension-tester": "^8.6.0"
4747
},
4848
"dependencies": {
4949
"clone-deep": "^4.0.1",

tests/e2e/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
"workbench.editor.enablePreview": true,
44
"git.autoRepositoryDetection": false,
55
"terminal.integrated.sendKeybindingsToShell": true
6-
}
6+
}

tests/e2e/src/helpers/Conf.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { Chance } from 'chance'
55
const chance = new Chance()
66

77
export class Config {
8-
static commonUrl = process.env.COMMON_URL || 'http://localhost:8080'
98
static apiUrl = process.env.API_URL || 'http://127.0.0.1:5541/api'
109
static vscodeVersion = process.env.VSCODE_VERSION || '1.87.2'
1110
static extensionName =

tests/e2e/src/tests/browser/filtering.ts renamed to tests/e2e/src/tests/browser/filtering.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ describe('Filtering per key name in DB with 10 millions of keys', () => {
428428
for (let i = 0; i < keyTypes.length - 1; i++) {
429429
await treeView.selectFilterGroupType(keyTypes[i].keyName)
430430
// Waiting for long db loading
431-
CommonDriverExtension.driverSleep(2000)
431+
CommonDriverExtension.driverSleep(3000)
432432
// Verify that all results have the same type as in filter
433433
expect(
434434
await treeView.getElementText(treeView.getTreeViewItemByIndex(i + 1)),

0 commit comments

Comments
 (0)