Those tests was simply broken and timed out without failing the test
before this PRs:
- #46911
- #46857
- #46779, #46636, #46619
So after those fixes they should be fast and fasttest compatible.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
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>
By default expect matches patterns against output from the current
process, however if you don't have stdin attached (like the case for
CI), you will not have anything to check against, hence "timeout" simply
does not work.
Likely expect has $any_spawn_id (another option is to put expect_after
after spawn).
v2: use $any_spawn_id
Refs: https://github.com/ClickHouse/ClickHouse/pull/43819
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Yes, all writes to the history file is done under flock, *but*, before
writing the history file there is sort(), and so if you will run the
following tests the 01300_client_save_history_when_terminated_long will fail:
$ /src/tests/clickhouse-test --print-time -j2 01180_client_syntax_errors 01300_client_save_history_when_terminated_long 0001_select
And it has nothing todo with timeouts:
expect: does "" (spawn_id exp8) match glob pattern "for the history"? no
f8f1dbfdaaca :) select (1, 2
expect: does "\u001b[1Gf8f1dbfdaaca :) select \u001b[0;22;33m(\u001b[0;22;32m1\u001b[0;1m,\u001b[0m \u001b[0;22;32m2\u001b[0m\u001b[J" (spawn_id exp8) match glob pattern "for the history"? no
expect: does "\u001b[1Gf8f1dbfdaaca :) select \u001b[0;22;33m(\u001b[0;22;32m1\u001b[0;1m,\u001b[0m \u001b[0;22;32m2\u001b[0m\u001b[J\u001b[29G" (spawn_id exp8) match glob pattern "for the history"? no
expect: timed out
The "select (1, 2" is from 01180_client_syntax_errors
And use real file only when the history should be preserved across runs
(i.e. there are multiple invocations of clickhouse-client)
CI: https://s3.amazonaws.com/clickhouse-test-reports/0/1adfbac19fed9813725d8b1df14e617b58a45d20/stateless_tests__asan__[2/2].html
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>