Skip to content

Commit

Permalink
fix run.sh.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachelint committed Jun 16, 2023
1 parent 16511ee commit 4aa348a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ jobs:
path: |
/tmp/ceresdb-stdout.log
recover-test:
name: recover-test
recovery-test:
name: recovery-test
runs-on: ubuntu-latest
timeout-minutes: 120
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ run-prom:
cd prom && ./run-tests.sh

run-recovery: clean build-ceresdb kill-old-process
cd recovery && sh ./run.sh && sh ./run.sh shard_based
cd recovery && ./run.sh && ./run.sh shard_based
2 changes: 1 addition & 1 deletion integration_tests/recovery/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def prepare_data(ts, tables):
""".format(tables[1], ts-5000, ts))

def query_and_check(ts, tables):
expected = {'rows': [{'tsid': 7518337278486593135, 't': ts - 5000, 'tag1': 'v1', 'tag2': 'v2', 'value': 1.0, 'VALUE2': 2.0},\
expected = {'rows': [{'tsid': 7518337278486593135, 't': ts - 500, 'tag1': 'v1', 'tag2': 'v2', 'value': 1.0, 'VALUE2': 2.0},\
{'tsid': 7518337278486593135, 't': ts, 'tag1': 'v1', 'tag2': 'v2', 'value': 11.0, 'VALUE2': 22.0}]}
expected2 = {'rows': [{'tsid': 7518337278486593135, 't': ts - 5000, 'tag1': 'v1', 'tag2': 'v2', 'value': 10.0, 'VALUE2': 20.0},\
{'tsid': 7518337278486593135, 't': ts, 'tag1': 'v1', 'tag2': 'v2', 'value': 110.0, 'VALUE2': 220.0}]}
Expand Down
6 changes: 4 additions & 2 deletions integration_tests/recovery/run.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#!/usr/bin/env bash

set -e

# for compatibility in macos
ROOT=`pwd`
NOW=`date +%s000`
BINARY_PATH=${ROOT}/../../target/debug/ceresdb-server
SERVER_HTTP_ENDPOINT=127.0.0.1:5440

CONFIG_FILE=${ROOT}/../../docs/minimal.toml
if [[ ${1} == "shard_based" ]]; then
if [ ${1} == 'shard_based' ]; then
CONFIG_FILE=${ROOT}/../config/shard-based-recovery.toml
fi

Expand All @@ -25,7 +27,7 @@ python3 ./check.py -ts ${NOW}

echo "Flush, restart and check..."
curl -XPOST ${SERVER_HTTP_ENDPOINT}/debug/flush_memtable
echo "\nflush finish..."
echo "\nFlush finish..."
killall ceresdb-server | true
nohup ${BINARY_PATH} --config ${CONFIG_FILE} &
sleep 10
Expand Down

0 comments on commit 4aa348a

Please sign in to comment.