Merge pull request #46857 from azat/tests/final-expect-fixes

Final fixes for expect tests
This commit is contained in:
Alexey Milovidov 2023-02-25 22:49:08 +03:00 committed by GitHub
commit 1a604f834c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -21,10 +21,12 @@ expect ":) "
# Make a query
send -- "SELECT 'print query id'\r"
expect {
"Query id: *" { }
# (?n) - Do not match new lines [1]
# [1]: https://www.tcl.tk/man/tcl8.6/TclCmd/re_syntax.html
-re "(?n)Query id: .*" { }
timeout { exit 1 }
}
expect "print query id"
expect "'print query id"
expect ":) "
send -- "\4"

View File

@ -19,9 +19,9 @@ expect_after {
spawn bash -c "source $basedir/../shell_config.sh ; \$CLICKHOUSE_CLIENT_BINARY \$CLICKHOUSE_CLIENT_OPT --disable_suggestion --history_file=$history_file"
expect -re "ClickHouse client version \[\\d\]{2}.\[\\d\]{1,2}.\[\\d\]{1,2}.\[\\d\]{1,2}.\r"
expect -re "Connecting to database .* at localhost:9000 as user default.\r"
expect -re "Connected to ClickHouse server version \[\\d\]{2}.\[\\d\]{1,2}.\[\\d\]{1,2} revision .*\r"
expect -re "ClickHouse client version \[\\d\]{2}\.\[\\d\]{1,2}\.\[\\d\]{1,2}\.\[\\d\]{1,}\.\r"
expect -re "Connecting to database .* at localhost:9000 as user default\.\r"
expect -re "Connected to ClickHouse server version \[\\d\]{2}\.\[\\d\]{1,2}\.\[\\d\]{1,2} revision \[\\d\]{1,}\.\r"
expect ":) "
send -- ""