Merge pull request #11872 from ClickHouse/fix-flaky-test-no-password-in-command-line

Fix flaky test "no password in command line"
This commit is contained in:
alexey-milovidov 2020-06-23 02:47:44 +03:00 committed by GitHub
commit 555189c5ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,12 +11,23 @@ $CLICKHOUSE_CLIENT --query "CREATE USER user IDENTIFIED WITH PLAINTEXT_PASSWORD
# False positive result due to race condition with sleeps is Ok.
$CLICKHOUSE_CLIENT --user user --password hello --query "SELECT sleep(1)" &
sleep 0.1
# Wait for query to start executing. At that time, the password should be cleared.
while true; do
sleep 0.1
$CLICKHOUSE_CLIENT --query "SHOW PROCESSLIST" | grep -q 'SELECT sleep(1)' && break;
done
ps auxw | grep -F -- '--password' | grep -F hello ||:
wait
$CLICKHOUSE_CLIENT --user user --password=hello --query "SELECT sleep(1)" &
sleep 0.1
while true; do
sleep 0.1
$CLICKHOUSE_CLIENT --query "SHOW PROCESSLIST" | grep -q 'SELECT sleep(1)' && break;
done
ps auxw | grep -F -- '--password' | grep -F hello ||:
wait