mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Merge pull request #46619 from azat/fix-client-reconnect
Update 01565_reconnect_after_client_error to not expect explicit reconnect
This commit is contained in:
commit
17959538d8
@ -15,27 +15,35 @@ match_max 100000
|
|||||||
|
|
||||||
expect_after {
|
expect_after {
|
||||||
# Do not ignore eof from expect
|
# Do not ignore eof from expect
|
||||||
eof { exp_continue }
|
-i $any_spawn_id eof { exp_continue }
|
||||||
# A default timeout action is to do nothing, change it to fail
|
# A default timeout action is to do nothing, change it to fail
|
||||||
timeout { exit 1 }
|
-i $any_spawn_id timeout { exit 1 }
|
||||||
}
|
}
|
||||||
|
|
||||||
spawn bash -c "source $basedir/../shell_config.sh ; \$CLICKHOUSE_CLIENT_BINARY \$CLICKHOUSE_CLIENT_OPT --disable_suggestion -mn --history_file=$history_file"
|
spawn bash -c "source $basedir/../shell_config.sh ; \$CLICKHOUSE_CLIENT_BINARY \$CLICKHOUSE_CLIENT_OPT --disable_suggestion -mn --history_file=$history_file"
|
||||||
expect "\n:) "
|
expect "\n:) "
|
||||||
|
|
||||||
send -- "DROP TABLE IF EXISTS t01565;\n"
|
send -- "DROP TABLE IF EXISTS t01565;\n"
|
||||||
|
# NOTE: this is important for -mn mode, you should send "\r" only after reading echoed command
|
||||||
|
expect "DROP"
|
||||||
|
send -- "\r"
|
||||||
expect "\nOk."
|
expect "\nOk."
|
||||||
expect "\n:)"
|
expect "\n:)"
|
||||||
|
|
||||||
send -- "CREATE TABLE t01565 (c0 String, c1 Int32) ENGINE = Memory() ;\n"
|
send -- "CREATE TABLE t01565 (c0 String, c1 Int32) ENGINE = Memory() ;\n"
|
||||||
|
expect "CREATE"
|
||||||
|
send -- "\r"
|
||||||
expect "\nOk."
|
expect "\nOk."
|
||||||
expect "\n:) "
|
expect "\n:) "
|
||||||
|
|
||||||
send -- "INSERT INTO t01565(c0, c1) VALUES (\"1\",1) ;\n"
|
send -- "INSERT INTO t01565(c0, c1) VALUES (\"1\",1) ;\n"
|
||||||
expect "\nConnected"
|
expect "INSERT"
|
||||||
|
send -- "\r"
|
||||||
expect "\n:) "
|
expect "\n:) "
|
||||||
|
|
||||||
send -- "INSERT INTO t01565(c0, c1) VALUES ('1', 1) ;\n"
|
send -- "INSERT INTO t01565(c0, c1) VALUES ('1', 1) ;\n"
|
||||||
|
expect "INSERT"
|
||||||
|
send -- "\r"
|
||||||
expect "\nOk."
|
expect "\nOk."
|
||||||
expect "\n:) "
|
expect "\n:) "
|
||||||
|
|
Loading…
Reference in New Issue
Block a user