mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-19 14:11:58 +00:00
cb4d665c02
Example of such greeting: 2023-02-26 15:26:33 expect: does "\u001b[0J\u001b[?25hClickHouse client version 23.3.1.207 (official build).\r\nConnecting to database test_i4r0kozg at localhost:9000 as user default.\r\nConnected to ClickHouse server version 23.3.1 revision 54461.\r\n\r\nWarnings:\r\n * Server logging level is set to 'test' and performance is degraded. This cannot be used in production.\r\n * Linux is not using a fast clock source. Performance can be degraded. Check /sys/devices/system/clocksource/clocksource0/current_clocksource\r\n * The setting 'allow_remote_fs_zero_copy_replication' is enabled for MergeTree tables. But the feature of 'zero-copy replication' is under development and is not ready for production. The usage of this feature can lead to data corruption and loss. The setting should be disabled in production.\r\n * Table system.session_log is enabled. It's unreliable and may contain garbage. Do not use it for any kind of security monitoring.\r\n\r\n\u001b[?2004h\u001b[1Gfunctional-tests :) " (spawn_id exp4) match regular expression "ClickHouse client version [\d]{2}.[\d]{1,2}.[\d]{1,2}.[\d]{1,}.\r"? Gate "ClickHouse client version *\r"? gate=yes re=no CI: https://s3.amazonaws.com/clickhouse-test-reports/0/df1e18ad4cb9b08240273169ca7dd6ca1cac617c/stateless_tests__aarch64_/run.log Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
30 lines
987 B
Plaintext
Executable File
30 lines
987 B
Plaintext
Executable File
#!/usr/bin/expect -f
|
||
# Tags: long
|
||
|
||
set basedir [file dirname $argv0]
|
||
set basename [file tail $argv0]
|
||
exp_internal -f $env(CLICKHOUSE_TMP)/$basename.debuglog 0
|
||
set history_file $env(CLICKHOUSE_TMP)/$basename.history
|
||
|
||
log_user 0
|
||
set timeout 60
|
||
match_max 100000
|
||
|
||
expect_after {
|
||
# Do not ignore eof from expect
|
||
-i $any_spawn_id eof { exp_continue }
|
||
# A default timeout action is to do nothing, change it to fail
|
||
-i $any_spawn_id timeout { exit 1 }
|
||
}
|
||
|
||
spawn bash -c "source $basedir/../shell_config.sh ; \$CLICKHOUSE_CLIENT_BINARY \$CLICKHOUSE_CLIENT_OPT --disable_suggestion --history_file=$history_file"
|
||
|
||
# (?n) - Do not match new lines
|
||
expect -re "(?n)ClickHouse client version \[\\d\]{2}\.\[\\d\]{1,2}\.\[\\d\]{1,2}\.\[\\d\]{1,}.*\r"
|
||
expect -re "(?n)Connecting to database .* at localhost:9000 as user default\.\r"
|
||
expect -re "(?n)Connected to ClickHouse server version \[\\d\]{2}\.\[\\d\]{1,2}\.\[\\d\]{1,2} revision \[\\d\]{1,}\.\r"
|
||
expect ":) "
|
||
|
||
send -- ""
|
||
expect eof
|