mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Fix flaky test "no password in command line"
This commit is contained in:
parent
0e42649e39
commit
d46932b3f4
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user