Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(jenkins): use e2e in the CI #61803

Merged
merged 111 commits into from
May 26, 2020
Merged
Show file tree
Hide file tree
Changes from 91 commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
4bae6fd
ci(jenkins): help to run locally
v1v Feb 21, 2020
05e22f8
ci(jenkins): use the customised kibana.dev.yml file
v1v Feb 21, 2020
45232cd
ci(jenkins): fix sheelint
v1v Feb 21, 2020
4013ae4
ci(jenkins): change config filename
v1v Feb 21, 2020
3cf7bf0
ci(jenkins): fix the issue with the login
v1v Feb 21, 2020
61a50d0
disable security for the time being
v1v Feb 25, 2020
20ce71c
Merge remote-tracking branch 'upstream/master' into feature/enable-e2…
v1v Mar 21, 2020
037b564
To store more genericly
v1v Mar 21, 2020
7139757
cherry-pick some changes from https://github.com/elastic/kibana/pull/…
v1v Mar 21, 2020
f83f482
only for testing purposes, let's disable the error for now
v1v Mar 21, 2020
6c5cfc3
e2e and cypress folders
v1v Mar 21, 2020
26d1761
cherry-pick from https://github.com/elastic/kibana/pull/59152
v1v Mar 21, 2020
d5aa1db
cherry-pick from https://github.com/elastic/kibana/pull/59152
v1v Mar 24, 2020
bb22a3a
Cherry-pick from https://github.com/elastic/kibana/pull/59152
v1v Mar 24, 2020
ec90cf8
ensure it does not fail
v1v Mar 24, 2020
f96e607
change the folder
v1v Mar 24, 2020
b0c0cb7
use relative path
v1v Mar 24, 2020
8fc8a91
add debug
v1v Mar 24, 2020
090d8ee
ci(jenkins): solve ingest-data issues
v1v Mar 24, 2020
04290d2
Merge remote-tracking branch 'upstream/master' into feature/enable-e2…
v1v Mar 24, 2020
dbc7954
ci(jenkins): fix the new ports
v1v Mar 24, 2020
a80d57d
ci(jenkins): use same command that the one used in the local one
v1v Mar 24, 2020
7e231e9
chore: cosmetic chagne
v1v Mar 24, 2020
09fd045
fix: leftover
v1v Mar 24, 2020
481c1ed
fix: secret-token is not in the run-e2e.sh
v1v Mar 24, 2020
a005714
revert to previous configuration since I've seen some errors with the…
v1v Mar 24, 2020
ce3c8eb
ci(jenkins): fix the issue with the login
v1v Mar 25, 2020
9e8eea0
ci(jenkins): use the same commands that the one locally
v1v Mar 25, 2020
d9e0171
cosmetic changes
v1v Mar 25, 2020
b86ff90
ci(jenkins): required
v1v Mar 25, 2020
4a1d5d4
avoidi the restart of the service when watching for changes
v1v Mar 25, 2020
d23292d
ci(jenkins): use e2e in the CI
v1v Mar 30, 2020
7afbc66
Update docs with the new approach
v1v Mar 30, 2020
a4275f3
ci(jenkins): nohup in the background
v1v Mar 30, 2020
00e6451
ci(jenkins): use e2e in the CI
v1v Mar 30, 2020
ace28cc
Update docs with the new approach
v1v Mar 30, 2020
6d864ed
ci(jenkins): nohup in the background
v1v Mar 30, 2020
f097ae5
ci(jenkins): missing leftovers
v1v Mar 30, 2020
7e1b9e2
ci(jenkins): store logs
v1v Mar 30, 2020
cc55d56
ci(jenkins): use shebang instead with bash
v1v Mar 30, 2020
7c093ca
ci(jenkins): more debug
v1v Mar 30, 2020
3184a6d
archive firstly
v1v Mar 30, 2020
aff4179
simplify
v1v Mar 30, 2020
d9c81ee
ci(jenkins): enable debug in jenkins only
v1v Mar 30, 2020
1e0b5c8
ci(jenkins): tmp folder in the e2e dir
v1v Mar 30, 2020
cf4bcae
ci(jenkins): configure the CI accordingly
v1v Mar 30, 2020
446294a
Merge branch 'feature/e2e-changes' of github.com:v1v/kibana into feat…
v1v Mar 30, 2020
84bb7fd
ci(jenkins): run in a docker container
v1v Mar 30, 2020
6817ae3
set the workspace in the docker container
v1v Mar 30, 2020
6881ef7
normalise the cypress run command
v1v Mar 30, 2020
121c126
use the workspace
v1v Mar 30, 2020
6a6a7ba
Merge remote-tracking branch 'upstream/master' into feature/e2e-changes
v1v Apr 2, 2020
69fc229
ci(jenkins): CI workers are now configured with cypress dependencies
v1v Apr 3, 2020
332d393
Merge remote-tracking branch 'upstream/master' into feature/e2e-changes
v1v Apr 3, 2020
b721ead
ci(jenkins): use the same command that the provided in the comment 'T…
v1v Apr 3, 2020
6c547f6
ci(jenkins): to avoid listening for changes for the log file
v1v Apr 3, 2020
ece4252
Revert "ci(jenkins): to avoid listening for changes for the log file"
v1v Apr 3, 2020
9fd0379
Revert "ci(jenkins): use the same command that the provided in the co…
v1v Apr 3, 2020
3afa558
as suggested let's see if it works
v1v Apr 3, 2020
3f879cb
store somewhere else
v1v Apr 3, 2020
b13329d
Merge remote-tracking branch 'upstream/master' into feature/e2e-changes
v1v Apr 7, 2020
8ec28fa
e2e: wait for status
v1v Apr 7, 2020
3dd525f
ci(jenkins): kibana is not up and running
v1v Apr 7, 2020
858b3ba
Revert "ci(jenkins): kibana is not up and running"
v1v Apr 7, 2020
22157c4
ci: wait for login to be ready
v1v Apr 7, 2020
ffe36f9
Revert "ci: wait for login to be ready"
v1v Apr 8, 2020
4d2eb75
ci(jenkins): double validate the status for the kibana instance
v1v Apr 8, 2020
e9f5f30
ci(jenkins): only cypress artifacts
v1v Apr 8, 2020
e72671f
fix: extend timeout
v1v Apr 8, 2020
95632e5
ci(jenkins): fix docker compose logs
v1v Apr 8, 2020
17b1ba6
e2e: reduce limit to avoid apm-server full queue
v1v Apr 8, 2020
708dd4f
e2e: tune apm-server
v1v Apr 8, 2020
dc8bdb3
ci(test): see if it's there
v1v Apr 8, 2020
2802f68
Run Kibana in no dev mode
v1v Apr 17, 2020
c485f8e
let's build kibana too
v1v Apr 17, 2020
a5804df
running ./bin/kibana instead
v1v Apr 17, 2020
1ee2c72
speed up the build
v1v Apr 17, 2020
72f2d03
Revert "speed up the build"
v1v Apr 17, 2020
6f5f191
Revert "running ./bin/kibana instead"
v1v Apr 17, 2020
820ec18
Revert "let's build kibana too"
v1v Apr 17, 2020
8de482f
ci: not ideal let's warm up the kibana instance
v1v Apr 17, 2020
f01e536
ci: use the right path
v1v Apr 17, 2020
943a498
ci: prepare context
v1v Apr 17, 2020
2d22dcb
ci: prepare the context
v1v Apr 17, 2020
24bee1e
ci: fix shebang
v1v Apr 17, 2020
3c73771
Revert "Run Kibana in no dev mode"
v1v Apr 18, 2020
caf6abc
refactor: keep it simple
v1v Apr 18, 2020
5b7aeac
Revert "e2e: reduce limit to avoid apm-server full queue"
v1v Apr 18, 2020
963e38c
e2e: enable videos
v1v Apr 18, 2020
814e7ac
Merge branch 'master' into feature/e2e-changes
elasticmachine Apr 20, 2020
69de467
Merge remote-tracking branch 'upstream/master' into feature/e2e-changes
v1v Apr 20, 2020
7c6ffa3
ci: api/status validation before running cypress
v1v Apr 20, 2020
250f73e
Revert "ci: api/status validation before running cypress"
v1v Apr 21, 2020
81f5c92
ci: not running in dev mode to be able to wait until all browser ass…
v1v Apr 21, 2020
98593d3
Revert "ci: not running in dev mode to be able to wait until all bro…
v1v Apr 22, 2020
833c93f
ci: rerun to avoid misleading with the test reruns
v1v Apr 22, 2020
765bfe3
Merge branch 'master' into feature/e2e-changes
elasticmachine Apr 22, 2020
0dd3b32
Merge remote-tracking branch 'upstream/master' into feature/e2e-changes
v1v May 4, 2020
a199d72
Merge branch 'feature/e2e-changes' of github.com:v1v/kibana into feat…
v1v May 4, 2020
4a979a7
chore: missing leftover from the merge
v1v May 4, 2020
37c5e6b
Merge branch 'master' into feature/e2e-changes
v1v May 6, 2020
58bdbbd
Merge remote-tracking branch 'upstream/master' into feature/e2e-changes
v1v May 13, 2020
7f58702
Merge branch 'master' into feature/e2e-changes
v1v May 25, 2020
4dea197
ci: workaround https://github.com/elastic/kibana/issues/66326
v1v May 25, 2020
cc989ab
revert e72671fa05eb766960fb28fe4dcfde16536b3069
v1v May 25, 2020
09c75f3
ci: add verbose output when running in the CI
v1v May 25, 2020
c3a465b
ci: faster cypress in the CI and more debug
v1v May 25, 2020
53f7ad6
Revert "revert e72671fa05eb766960fb28fe4dcfde16536b3069"
v1v May 25, 2020
7e1645b
ci: workaround the workaround
v1v May 26, 2020
fe4ed15
ci: revert retry
v1v May 26, 2020
b405ec5
fix prettier
v1v May 26, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 20 additions & 44 deletions .ci/end2end.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ pipeline {
environment {
BASE_DIR = 'src/github.com/elastic/kibana'
HOME = "${env.WORKSPACE}"
APM_ITS = 'apm-integration-testing'
CYPRESS_DIR = 'x-pack/legacy/plugins/apm/e2e'
E2E_DIR = 'x-pack/legacy/plugins/apm/e2e'
PIPELINE_LOG_LEVEL = 'DEBUG'
}
options {
Expand Down Expand Up @@ -43,32 +42,6 @@ pipeline {
env.APM_UPDATED = isGitRegionMatch(patterns: regexps)
}
}
dir("${APM_ITS}"){
git changelog: false,
credentialsId: 'f6c7695a-671e-4f4f-a331-acdce44ff9ba',
poll: false,
url: "git@github.com:elastic/${APM_ITS}.git"
}
}
}
stage('Start services') {
options { skipDefaultCheckout() }
when {
anyOf {
expression { return params.FORCE }
expression { return env.APM_UPDATED != "false" }
}
}
steps {
notifyStatus('Starting services', 'PENDING')
dir("${APM_ITS}"){
sh './scripts/compose.py start master --no-kibana'
}
}
post {
unsuccessful {
notifyStatus('Environmental issue', 'FAILURE')
}
Comment on lines -46 to -71
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the apm-integration-testing is now defined iin the run-e2e.sh script, so this is not required anymore.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 nice change

}
}
stage('Prepare Kibana') {
Expand All @@ -85,7 +58,7 @@ pipeline {
steps {
notifyStatus('Preparing kibana', 'PENDING')
dir("${BASE_DIR}"){
sh script: "${CYPRESS_DIR}/ci/prepare-kibana.sh"
sh "${E2E_DIR}/ci/prepare-kibana.sh"
}
}
post {
Expand All @@ -105,24 +78,27 @@ pipeline {
steps{
notifyStatus('Running smoke tests', 'PENDING')
dir("${BASE_DIR}"){
sh '''
jobs -l
docker build --tag cypress --build-arg NODE_VERSION=$(cat .node-version) ${CYPRESS_DIR}/ci
docker run --rm -t --user "$(id -u):$(id -g)" \
-v `pwd`:/app --network="host" \
--name cypress cypress'''
// As long as the kibana in dev mode is not reliable we need to run the tests
// a few times.
// TODO: APM-UI to provide the kibana run command that works at first.
sh "${E2E_DIR}/ci/run-e2e.sh || true"
retry(5) {
sleep 30
sh "${E2E_DIR}/ci/rerun-e2e.sh"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caused by #61942

}
}
}
post {
always {
dir("${BASE_DIR}"){
archiveArtifacts(allowEmptyArchive: false, artifacts: "${CYPRESS_DIR}/**/screenshots/**,${CYPRESS_DIR}/**/videos/**,${CYPRESS_DIR}/**/test-results/*e2e-tests.xml")
junit(allowEmptyResults: true, testResults: "${CYPRESS_DIR}/**/test-results/*e2e-tests.xml")
}
dir("${APM_ITS}"){
sh 'docker-compose logs > apm-its.log || true'
sh 'docker-compose down -v || true'
archiveArtifacts(allowEmptyArchive: false, artifacts: 'apm-its.log')
dir("${BASE_DIR}/${E2E_DIR}"){
archiveArtifacts(allowEmptyArchive: false, artifacts: 'cypress/screenshots/**,cypress/videos/**,cypress/test-results/*e2e-tests.xml')
junit(allowEmptyResults: true, testResults: 'cypress/test-results/*e2e-tests.xml')
dir('tmp/apm-integration-testing'){
sh 'docker-compose logs > apm-its-docker.log || true'
sh 'docker-compose down -v || true'
archiveArtifacts(allowEmptyArchive: true, artifacts: 'apm-its-docker.log')
}
archiveArtifacts(allowEmptyArchive: true, artifacts: 'tmp/*.log')
}
}
unsuccessful {
Expand All @@ -137,7 +113,7 @@ pipeline {
post {
always {
dir("${BASE_DIR}"){
archiveArtifacts(allowEmptyArchive: true, artifacts: "${CYPRESS_DIR}/ingest-data.log,kibana.log")
archiveArtifacts(allowEmptyArchive: true, artifacts: "${E2E_DIR}/kibana.log")
}
}
}
Expand Down
19 changes: 1 addition & 18 deletions x-pack/legacy/plugins/apm/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,4 @@
x-pack/legacy/plugins/apm/e2e/run-e2e.sh
```

_Starts Kibana, APM Server, Elasticsearch (with sample data) and runs the tests_

## Reproducing CI builds

> This process is very slow compared to the local development described above. Consider that the CI must install and configure the build tools and create a Docker image for the project to run tests in a consistent manner.

The Jenkins CI uses a shell script to prepare Kibana:

```shell
# Prepare and run Kibana locally
$ x-pack/legacy/plugins/apm/e2e/ci/prepare-kibana.sh
# Build Docker image for Kibana
$ docker build --tag cypress --build-arg NODE_VERSION=$(cat .node-version) x-pack/legacy/plugins/apm/e2e/ci
# Run Docker image
$ docker run --rm -t --user "$(id -u):$(id -g)" \
-v `pwd`:/app --network="host" \
--name cypress cypress
```
_Starts APM Server, Elasticsearch (with sample data) and runs the tests_
24 changes: 0 additions & 24 deletions x-pack/legacy/plugins/apm/e2e/ci/Dockerfile

This file was deleted.

36 changes: 0 additions & 36 deletions x-pack/legacy/plugins/apm/e2e/ci/entrypoint.sh

This file was deleted.

20 changes: 6 additions & 14 deletions x-pack/legacy/plugins/apm/e2e/ci/prepare-kibana.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
#!/usr/bin/env bash
set -e
set -ex

E2E_DIR="x-pack/legacy/plugins/apm/e2e"

echo "1/3 Install dependencies ..."
E2E_DIR=x-pack/legacy/plugins/apm/e2e
echo "1/2 Install dependencies ..."
# shellcheck disable=SC1091
source src/dev/ci_setup/setup_env.sh true
yarn kbn bootstrap

echo "2/3 Ingest test data ..."
pushd ${E2E_DIR}
yarn install
curl --silent https://storage.googleapis.com/apm-ui-e2e-static-data/events.json --output ingest-data/events.json
node ingest-data/replay.js --server-url http://localhost:8201 --secret-token abcd --events ./events.json > ingest-data.log
yarn kbn clean && yarn kbn bootstrap

echo "3/3 Start Kibana ..."
popd
echo "2/2 Start Kibana ..."
## Might help to avoid FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
export NODE_OPTIONS="--max-old-space-size=4096"
nohup node scripts/kibana --config "${E2E_DIR}/ci/kibana.e2e.yml" --no-base-path --optimize.watch=false> kibana.log 2>&1 &
nohup node ./scripts/kibana --no-base-path --no-watch --dev --no-dev-config --config ${E2E_DIR}/ci/kibana.e2e.yml > ${E2E_DIR}/kibana.log 2>&1 &
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not like to launch a background process on an Agent you would have weird and inexplicable behaviors.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, there is a requirement to have a kibana instance up and running for that particular source code, what are the alternatives to do it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make the provisioning on the docker-compose, let's open a follow up to add a flag to the compose.py to run Kibana from sources and try to make the e2e script works with it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

17 changes: 17 additions & 0 deletions x-pack/legacy/plugins/apm/e2e/ci/rerun-e2e.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
##
## This is a wrapper to configure the environment with the right tools in the CI
## and run the cypress steps.
##
## NOTE: it's required to run run-e2e.sh previously. This is the wrapper to help with
## the rerun of the e2e.
##

E2E_DIR="${0%/*}/.."
# shellcheck disable=SC1091
source src/dev/ci_setup/setup_env.sh true
set -ex
cd "${E2E_DIR}"
rm cypress/test-results/*.* || true
rm -rf cypress/screenshots/* || true
yarn cypress run --config pageLoadTimeout=100000,watchForFileChanges=true
11 changes: 11 additions & 0 deletions x-pack/legacy/plugins/apm/e2e/ci/run-e2e.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
##
## This is a wrapper to configure the environment with the right tools in the CI
## and run the e2e steps.
##

E2E_DIR="${0%/*}/.."
# shellcheck disable=SC1091
source src/dev/ci_setup/setup_env.sh true
set -ex
"${E2E_DIR}"/run-e2e.sh
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/apm/e2e/cypress.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"nodeVersion": "system",
"baseUrl": "http://localhost:5701",
"video": false,
"video": true,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the video I see that the login page is not shown but the link directly to the apm/apm#/services?rangeFrom..., is that the expected behaviour? or should it click on the login page firstly and the go to apm/apm....?

"trashAssetsBeforeRuns": false,
"fileServerFolder": "../",
"fixturesFolder": "./cypress/fixtures",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps';
import { loginAndWaitForPage } from '../../integration/helpers';

/** The default time in ms to wait for a Cypress command to complete */
export const DEFAULT_TIMEOUT = 60 * 1000;

Given(`a user browses the APM UI application`, () => {
// open service overview page
loginAndWaitForPage(`/app/apm#/services`);
});

When(`the user inspects the opbeans-node service`, () => {
// click opbeans-node service
cy.get(':contains(opbeans-node)')
cy.get(':contains(opbeans-node)', { timeout: DEFAULT_TIMEOUT })
.last()
.click({ force: true });
});
Expand Down
10 changes: 5 additions & 5 deletions x-pack/legacy/plugins/apm/e2e/run-e2e.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sh shell might be using dash in the CI Workers, let's ensure we do use the bash one with the shebang approach. Otherwise, the log traces might indicate something bad is going on:

[2020-03-30T14:49:49.373Z] + x-pack/legacy/plugins/apm/e2e/run-e2e.sh
[2020-03-30T14:49:49.373Z] 
[2020-03-30T14:49:49.373Z] To start Kibana please run the following command:
[2020-03-30T14:49:49.373Z] node ./scripts/kibana --no-base-path --dev --no-dev-config --config x-pack/legacy/plugins/apm/e2e/ci/kibana.e2e.yml
[2020-03-30T14:49:49.373Z] 
[2020-03-30T14:49:49.373Z] Temporary folder
[2020-03-30T14:49:49.373Z] Temporary files will be stored in: ./tmp
[2020-03-30T14:49:49.373Z] 
[2020-03-30T14:49:49.373Z] apm-integration-testing (logs: ./tmp/apm-it.log)
[2020-03-30T14:49:49.373Z] Cloning repository
[2020-03-30T14:49:49.373Z] Starting docker-compose
[2020-03-30T14:49:49.373Z] 
[2020-03-30T14:49:49.373Z] Static mock data (logs: ./tmp/ingest-data.log)
[2020-03-30T14:49:49.373Z] Downloading events.json...
[2020-03-30T14:49:49.373Z] x-pack/legacy/plugins/apm/e2e/run-e2e.sh: 63: x-pack/legacy/plugins/apm/e2e/run-e2e.sh: ./tmp/apm-integration-testing/scripts/compose.py: not found
[2020-03-30T14:49:49.373Z] Cloning into './tmp/apm-integration-testing'...
[2020-03-30T14:49:49.373Z] CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[2020-03-30T14:49:49.373Z] 
[2020-03-30T14:49:49.373Z] ⚠️  Not all events were ingested correctly. This might affect test tests. 


# variables
KIBANA_PORT=5701
Expand Down Expand Up @@ -65,6 +65,8 @@ ${APM_IT_DIR}/scripts/compose.py start master \
--elasticsearch-port $ELASTICSEARCH_PORT \
--apm-server-port=$APM_SERVER_PORT \
--elasticsearch-heap 4g \
--apm-server-opt queue.mem.events=8192 \
--apm-server-opt output.elasticsearch.bulk_max_size=4096 \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes #62979

&> ${TMP_DIR}/apm-it.log

# Stop if apm-integration-testing failed to start correctly
Expand Down Expand Up @@ -98,7 +100,7 @@ curl --silent --user admin:changeme -XDELETE "localhost:${ELASTICSEARCH_PORT}/.a
curl --silent --user admin:changeme -XDELETE "localhost:${ELASTICSEARCH_PORT}/apm*" > /dev/null

# Ingest data into APM Server
node ingest-data/replay.js --server-url http://localhost:$APM_SERVER_PORT --events ${TMP_DIR}/events.json 2> ${TMP_DIR}/ingest-data.log
node ingest-data/replay.js --server-url http://localhost:$APM_SERVER_PORT --events ${TMP_DIR}/events.json 2>> ${TMP_DIR}/ingest-data.log

# Stop if not all events were ingested correctly
if [ $? -ne 0 ]; then
Expand All @@ -111,8 +113,7 @@ fi
##################################################
echo "\n${bold}Waiting for Kibana to start...${normal}"
echo "Note: you need to start Kibana manually. Find the instructions at the top."
yarn wait-on -i 500 -w 500 http://localhost:$KIBANA_PORT > /dev/null

yarn wait-on -i 500 -w 500 http://localhost:${KIBANA_PORT}/status > /dev/null
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See 8dd7213. We even tried to get 200 http code rather than 2xx:

But it was reverted as it did not work as expected

echo "\n✅ Setup completed successfully. Running tests...\n"

#
mdelapenya marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -129,4 +130,3 @@ ${bold}If you want to run the test interactively, run:${normal}

yarn cypress open --config pageLoadTimeout=100000,watchForFileChanges=true
"