Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Commit

Permalink
test: fix unstable integration test auto_random_default (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
glorv authored Dec 21, 2020
1 parent e9a1bfb commit c2b6dde
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/auto_random_default/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@ for backend in tidb importer local; do
NEXT_AUTO_RAND_VAL=28
fi


run_sql "select count(distinct id >> 58) as count from auto_random.t"
check_contains "count: 2"
# tidb backend randomly generate the auto-random bit for each statement, so with 2 statements,
# the distinct auto_random prefix values can be 1 or 2, so we skip this check with tidb backend
if [ "$backend" != 'tidb' ]; then
run_sql "select count(distinct id >> 58) as count from auto_random.t"
check_contains "count: 2"
fi

# auto random base is 4
run_sql "SELECT max(id & b'000001111111111111111111111111111111111111111111111111111111111') >= $NEXT_AUTO_RAND_VAL as ge FROM auto_random.t"
Expand Down

0 comments on commit c2b6dde

Please sign in to comment.