Fix possible flakiness of 02132_client_history_navigation

It is possible to match some escape sequence as "2":

    send: sending "\r" to { exp4 }

    expect: does "\u001b[0m\u001b[J\u001b[29G" (spawn_id exp4) match glob pattern "2"? yes
    expect: set expect_out(0,string) "2"
    expect: set expect_out(spawn_id) "exp4"
    expect: set expect_out(buffer) "\u001b[0m\u001b[J\u001b[2"
    send: sending "exit\r" to { exp4 }
    [21GSELECT 2[0m[J[29G
    exit
    [1G:-] [5Gexit[0m[J[9G

    [1mSELECT[0m 2[1m AS [0;32mexit[0m

    Query id: 1105a048-79c8-4429-8452-b6f9c9c720f7

    ┌─[1mexit[0m─┐
    │    2 │
    └──────┘

CI: https://s3.amazonaws.com/clickhouse-test-reports/46779/fa3aeb6ff9c9409416c983151da73c6b8a2c5d66/stateless_tests_flaky_check__asan_/run.log
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
Azat Khuzhin 2023-02-24 11:17:06 +01:00
parent fa3aeb6ff9
commit 80a31ce652

View File

@ -23,16 +23,16 @@ spawn bash -c "source $basedir/../shell_config.sh ; \$CLICKHOUSE_CLIENT_BINARY \
expect ":) "
# Make a query
send -- "SELECT 1\r"
send -- "SELECT unique1\r"
expect "1"
expect ":) "
send -- "SELECT 2"
send -- "SELECT unique2"
# NOTE: it does not work for alacritty with TERM=xterm
send -- "\033\[A"
expect "SELECT 1"
expect "SELECT unique1"
send -- "\033\[B"
expect "SELECT 2"
expect "SELECT unique2"
send -- "\r"
expect "2"
expect "unique2"
send -- "exit\r"
expect eof