Make tests more stable in CI
parent
8cac795445
commit
e431ecb715
|
@ -39,19 +39,19 @@ done
|
|||
cd mon
|
||||
npm install
|
||||
cd ..
|
||||
node mon/mon-main.js --etcd_url $ETCD_URL --etcd_prefix "/vitastor" --verbose 1 &>./testdata/mon.log &
|
||||
(while true; do node mon/mon-main.js --etcd_url $ETCD_URL --etcd_prefix "/vitastor" --verbose 1 || true; done) &>./testdata/mon.log &
|
||||
MON_PID=$!
|
||||
|
||||
if [ "$SCHEME" = "ec" ]; then
|
||||
PG_SIZE=${PG_SIZE:-5}
|
||||
PG_MINSIZE=${PG_MINSIZE:-3}
|
||||
PG_DATA_SIZE=$PG_MINSIZE
|
||||
POOLCFG='"scheme":"ec","parity_chunks":'$((PG_SIZE-PG_MINSIZE))
|
||||
PG_MINSIZE=${PG_MINSIZE:-4}
|
||||
PG_DATA_SIZE=${PG_DATA_SIZE:-3}
|
||||
POOLCFG='"scheme":"ec","parity_chunks":'$((PG_SIZE-PG_DATA_SIZE))
|
||||
elif [ "$SCHEME" = "xor" ]; then
|
||||
PG_SIZE=${PG_SIZE:-3}
|
||||
PG_MINSIZE=${PG_MINSIZE:-2}
|
||||
PG_DATA_SIZE=$PG_MINSIZE
|
||||
POOLCFG='"scheme":"xor","parity_chunks":'$((PG_SIZE-PG_MINSIZE))
|
||||
PG_MINSIZE=${PG_MINSIZE:-3}
|
||||
PG_DATA_SIZE=$((PG_SIZE-1))
|
||||
POOLCFG='"scheme":"xor","parity_chunks":1'
|
||||
else
|
||||
PG_SIZE=${PG_SIZE:-2}
|
||||
PG_MINSIZE=${PG_MINSIZE:-2}
|
||||
|
|
|
@ -44,5 +44,5 @@ SCHEME=xor ./test_write.sh
|
|||
|
||||
./test_write_no_same.sh
|
||||
|
||||
./test_heal.sh
|
||||
SCHEME=ec PG_MINSIZE=2 ./test_heal.sh
|
||||
PG_SIZE=2 ./test_heal.sh
|
||||
SCHEME=ec ./test_heal.sh
|
||||
|
|
|
@ -28,7 +28,7 @@ if ! ($ETCDCTL get /vitastor/config/pgs --print-value-only |\
|
|||
format_error "FAILED: OSD NOT ADDED INTO DISTRIBUTION"
|
||||
fi
|
||||
|
||||
wait_finish_rebalance 20
|
||||
wait_finish_rebalance 60
|
||||
|
||||
sleep 1
|
||||
kill -9 $OSD4_PID
|
||||
|
@ -50,6 +50,6 @@ if ! ($ETCDCTL get /vitastor/config/pgs --print-value-only |\
|
|||
format_error "FAILED: OSD NOT REMOVED FROM DISTRIBUTION"
|
||||
fi
|
||||
|
||||
wait_finish_rebalance 20
|
||||
wait_finish_rebalance 60
|
||||
|
||||
format_green OK
|
||||
|
|
|
@ -2,7 +2,11 @@
|
|||
|
||||
# Kill OSDs while writing
|
||||
|
||||
PG_SIZE=3
|
||||
PG_SIZE=${PG_SIZE:-3}
|
||||
if [[ "$SCHEME" = "ec" ]]; then
|
||||
PG_DATA_SIZE=${PG_DATA_SIZE:-2}
|
||||
PG_MINSIZE=${PG_MINSIZE:-3}
|
||||
fi
|
||||
OSD_COUNT=7
|
||||
PG_COUNT=32
|
||||
. `dirname $0`/run_3osds.sh
|
||||
|
|
|
@ -31,7 +31,7 @@ try_reweight 4 1
|
|||
try_reweight 5 1
|
||||
|
||||
# Wait for the rebalance to finish
|
||||
wait_finish_rebalance 60
|
||||
wait_finish_rebalance 300
|
||||
|
||||
# Check that PGs never had degraded objects !
|
||||
# FIXME: In fact, the test doesn't guarantee it because PGs aren't always peered only with full prior OSD sets :-(
|
||||
|
|
|
@ -14,7 +14,7 @@ for i in $(seq 1 $OSD_COUNT); do
|
|||
eval OSD${i}_PID=$!
|
||||
done
|
||||
|
||||
node mon/mon-main.js --etcd_url $ETCD_URL --etcd_prefix "/vitastor" &>./testdata/mon.log &
|
||||
(while true; do node mon/mon-main.js --etcd_url $ETCD_URL --etcd_prefix "/vitastor" --verbose 1 || true; done) &>./testdata/mon.log &
|
||||
MON_PID=$!
|
||||
|
||||
sleep 3
|
||||
|
|
Loading…
Reference in New Issue