1
0
mirror of https://github.com/metrico/qryn.git synced 2025-03-15 10:14:19 +00:00

fix tests CI

This commit is contained in:
akvlad
2024-09-10 03:10:54 +03:00
parent 71e5f96360
commit 32a17ca5a1
3 changed files with 7 additions and 19 deletions

@ -36,29 +36,17 @@ jobs:
- 9000:9000
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: build qryn-view
uses: ./.github/actions/get-view
env:
TAG: v3.3.2
- name: check if qryn-view pulled
run: pushd view && ls | grep assets && popd
- run: npm install
- run: npm run postinstall
- run: git submodule init
- run: git submodule update
- name: Workflow Telemetry
uses: runforesight/workflow-telemetry-action@v1.8.7
if: github.event_name != 'pull_request'
- env:
CLICKHOUSE_DB: qryn
CLICKHOUSE_TSDB: qryn
INTEGRATION_E2E: 1
CLOKI_EXT_URL: 127.0.0.1:3100
QRYN_LOGIN: a
QRYN_PASSWORD: b
run: node qryn.mjs >/dev/stdout & npm run test --forceExit
NODE_VERSION: ${{ matrix.node-version }}
run: "sh ./test/e2e/compose/clickhouse_sso_e2e/run_test.sh"

@ -7,7 +7,7 @@
"qryn": "./qryn_node.js"
},
"scripts": {
"test": "jest",
"test": "jest --maxWorkers 1 --forceExit",
"start": "node qryn.mjs",
"pretty": "node qryn.mjs | pino-pretty",
"postinstall": "patch-package",

@ -246,11 +246,11 @@ const selectMergeProfile = async (req, res) => {
const series = async (req, res) => {
const _req = req.body
const fromTimeSec = Math.floor(req.getStart && req.getStart()
? parseInt(req.getStart()) / 1000
const fromTimeSec = Math.floor(_req.getStart && _req.getStart()
? parseInt(_req.getStart()) / 1000
: (Date.now() - HISTORY_TIMESPAN) / 1000)
const toTimeSec = Math.floor(req.getEnd && req.getEnd()
? parseInt(req.getEnd()) / 1000
const toTimeSec = Math.floor(_req.getEnd && _req.getEnd()
? parseInt(_req.getEnd()) / 1000
: Date.now() / 1000)
const dist = clusterName ? '_dist' : ''
const promises = []