Skip to content

Commit 8c73c48

Browse files
authored
Merge pull request #572 from metrico/chore/prometheus_tests
chore/pyroscope tests
2 parents 1140496 + f191c68 commit 8c73c48

File tree

6 files changed

+13
-47
lines changed

6 files changed

+13
-47
lines changed

.github/workflows/bun-clickhouse.js.yml

+1-13
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,10 @@ jobs:
3535
- 9000:9000
3636
steps:
3737
- uses: actions/checkout@v4
38-
- uses: oven-sh/setup-bun@v1
39-
with:
40-
bun-version: ${{ matrix.bun-version }}
4138
- run: rm -rf package-lock.json
4239
- run: git submodule init
4340
- run: git submodule update
44-
- run: bun install
45-
- run: cd test/e2e && bun install
4641
- name: Workflow Telemetry
4742
uses: runforesight/[email protected]
4843
if: github.event_name != 'pull_request'
49-
- env:
50-
CLICKHOUSE_DB: qryn
51-
CLICKHOUSE_TSDB: qryn
52-
INTEGRATION_E2E: 1
53-
CLOKI_EXT_URL: 127.0.0.1:3100
54-
QRYN_LOGIN: a
55-
QRYN_PASSWORD: b
56-
run: bun --bun qryn.mjs >/dev/stdout & bun run test --forceExit
44+
- run: 'sh test/e2e/compose/clickhouse_sso_e2e_bun/run_test.sh'

.github/workflows/node-clickhouse-cluster.js.yml

+3-13
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,10 @@ jobs:
2626
runs-on: ubuntu-latest
2727
strategy:
2828
matrix:
29-
node-version: [18, 16.x, 20]
29+
node-version: [18, 16, 20]
3030
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
3131
steps:
3232
- uses: actions/checkout@v4
33-
- name: Use Node.js ${{ matrix.node-version }}
34-
uses: actions/[email protected]
35-
with:
36-
node-version: ${{ matrix.node-version }}
37-
cache: 'npm'
3833
- run: npm install
3934
- run: npm run postinstall
4035
- run: git submodule init
@@ -44,14 +39,9 @@ jobs:
4439
with:
4540
version: v2.1.0 # defaults to 'latest'
4641
legacy: true # will also install in PATH as `docker-compose`
47-
- run: docker-compose -f docker/e2e/docker-compose-cluster.yaml up -d
48-
- run: sleep 5
4942
- name: Workflow Telemetry
5043
uses: runforesight/[email protected]
5144
if: github.event_name != 'pull_request'
5245
- env:
53-
CLICKHOUSE_DB: qryn
54-
CLICKHOUSE_TSDB: qryn
55-
INTEGRATION_E2E: 1
56-
CLOKI_EXT_URL: 127.0.0.1:3100
57-
run: CLUSTER_NAME=test_cluster_two_shards node qryn.mjs >/dev/stdout & sleep 10 && npm run test --forceExit
46+
NODE_VERSION: ${{ matrix.node-version }}
47+
run: "sh ./test/e2e/compose/clickhouse_cluster_e2e/run_test.sh"

.github/workflows/node-clickhouse.js.yml

+3-15
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
runs-on: ubuntu-latest
2727
strategy:
2828
matrix:
29-
node-version: [18, 16.x, 20]
29+
node-version: [18, 16, 20]
3030
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
3131
services:
3232
clickhouse:
@@ -36,29 +36,17 @@ jobs:
3636
- 9000:9000
3737
steps:
3838
- uses: actions/checkout@v4
39-
- name: Use Node.js ${{ matrix.node-version }}
40-
uses: actions/[email protected]
41-
with:
42-
node-version: ${{ matrix.node-version }}
43-
cache: 'npm'
4439
- name: build qryn-view
4540
uses: ./.github/actions/get-view
4641
env:
4742
TAG: v3.3.2
4843
- name: check if qryn-view pulled
4944
run: pushd view && ls | grep assets && popd
50-
- run: npm install
51-
- run: npm run postinstall
5245
- run: git submodule init
5346
- run: git submodule update
5447
- name: Workflow Telemetry
5548
uses: runforesight/[email protected]
5649
if: github.event_name != 'pull_request'
5750
- env:
58-
CLICKHOUSE_DB: qryn
59-
CLICKHOUSE_TSDB: qryn
60-
INTEGRATION_E2E: 1
61-
CLOKI_EXT_URL: 127.0.0.1:3100
62-
QRYN_LOGIN: a
63-
QRYN_PASSWORD: b
64-
run: node qryn.mjs >/dev/stdout & npm run test --forceExit
51+
NODE_VERSION: ${{ matrix.node-version }}
52+
run: "sh ./test/e2e/compose/clickhouse_sso_e2e/run_test.sh"

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"qryn": "./qryn_node.js"
88
},
99
"scripts": {
10-
"test": "jest",
10+
"test": "jest --maxWorkers 1 --forceExit",
1111
"start": "node qryn.mjs",
1212
"pretty": "node qryn.mjs | pino-pretty",
1313
"postinstall": "patch-package",

pyroscope/pyroscope.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,11 @@ const selectMergeProfile = async (req, res) => {
246246

247247
const series = async (req, res) => {
248248
const _req = req.body
249-
const fromTimeSec = Math.floor(req.getStart && req.getStart()
250-
? parseInt(req.getStart()) / 1000
249+
const fromTimeSec = Math.floor(_req.getStart && _req.getStart()
250+
? parseInt(_req.getStart()) / 1000
251251
: (Date.now() - HISTORY_TIMESPAN) / 1000)
252-
const toTimeSec = Math.floor(req.getEnd && req.getEnd()
253-
? parseInt(req.getEnd()) / 1000
252+
const toTimeSec = Math.floor(_req.getEnd && _req.getEnd()
253+
? parseInt(_req.getEnd()) / 1000
254254
: Date.now() / 1000)
255255
const dist = clusterName ? '_dist' : ''
256256
const promises = []

test/e2e

Submodule e2e updated from b09c5c8 to 376a7db

0 commit comments

Comments
 (0)