Randomize snapshot on exit in tests

This commit is contained in:
Antonio Andelic 2022-08-03 11:43:30 +00:00
parent 0b1554c2e7
commit 71e1b1916c
2 changed files with 6 additions and 0 deletions

View File

@ -3,6 +3,8 @@
<tcp_port>9181</tcp_port>
<server_id>1</server_id>
<create_snapshot_on_exit>true</create_snapshot_on_exit>
<coordination_settings>
<operation_timeout_ms>10000</operation_timeout_ms>
<session_timeout_ms>100000</session_timeout_ms>

View File

@ -80,6 +80,10 @@ ln -sf $SRC_PATH/dhparam.pem $DEST_SERVER_PATH/
ln -sf --backup=simple --suffix=_original.xml \
$SRC_PATH/config.d/query_masking_rules.xml $DEST_SERVER_PATH/config.d/
# We randomize creating the snapshot on exit for Keeper to test out using older snapshots
create_snapshot_on_exit=$(($RANDOM % 2))
cat $DEST_SERVER_PATH/config.d/keeper_port.xml | sed "s|<create_snapshot_on_exit>true</create_snapshot_on_exit>|<create_snapshot_on_exit>$create_snapshot_on_exit</create_snapshot_on_exit>|" > $DEST_SERVER_PATH/config.d/keeper_port.xml
if [[ -n "$USE_POLYMORPHIC_PARTS" ]] && [[ "$USE_POLYMORPHIC_PARTS" -eq 1 ]]; then
ln -sf $SRC_PATH/config.d/polymorphic_parts.xml $DEST_SERVER_PATH/config.d/
fi