Skip to content

Remove low-value integration tests - #122485

Merged
alexey-milovidov merged 3 commits into
masterfrom
remove-pointless-integration-tests
Sep 28, 2026
Merged

alexey-milovidov merged 3 commits into
masterfrom
remove-pointless-integration-tests

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

The integration test suite often does not fit in its timeout. Many of the integration tests added since 2026-02 are of low value: they check rare corner cases, test the test harness or the Web UI JavaScript rather than the server, check how malformed configs are handled, only assert that a metric, log line or setting exists, or reproduce internal races with failpoints.

This PR removes 111 such test files. They are 107 low-value tests plus the four test_system_stop.py modules for streaming engines (Kafka, NATS, RabbitMQ, S3Queue). Those four have some value, but together they take about 1450 s per run, which is too much for what they cover. Config files and helpers used only by the removed tests are removed too, along with their entries in the integration test durations table.

Estimated savings, based on per-test durations in CIDB for the week starting 2026-09-21 and AWS on-demand prices:

Job Cost per week, USD Share of test time removed Savings per week, USD
amd_asan_ubsan, db disk 20594 5.6% 1153
amd_tsan 18922 5.1% 973
amd_llvm_coverage 16924 5.5% 939
amd_msan 16549 5.3% 871
arm_binary, distributed plan 8996 6.7% 600
amd_asan_ubsan, db disk, old analyzer 6821 5.1% 350
other 1858 24
Total 90662 5.4% ~4900 (~255k per year)

Integration tests account for 40.6% of the total CI cost, so this is about 2.2% of the whole CI.

Removed test files
  • test_keeper_http_jemalloc/test.py
  • test_storage_s3_queue/test_file_iterator_lost_lock.py
  • test_unknown_config_option/test.py
  • test_parallel_replicas_alias_columns/test.py
  • test_refreshable_mv_no_multi_read/test.py
  • test_storage_kafka/test_keeper_session_loss_direct_read.py
  • test_executable_udf_async_metrics/test.py
  • test_keeper_container_nodes/test_disabled.py
  • test_keeper_ttl_nodes/test_disabled.py
  • test_http_handlers_config_error/test.py
  • test_refreshable_mv_watch_fault/test.py
  • test_rmv_access_denied_on_rename_race/test.py
  • test_storage_kafka/test_poll_timeout_after_assignment.py
  • test_phantom_parts_in_mutations/test.py
  • test_http_connection_socket_buffer_settings/test.py
  • test_intersect_or_except_kill_query/test.py
  • test_statistics_non_physical_upgrade/test.py
  • test_cluster_waiters/test_exec_in_container_detach.py
  • test_cluster_waiters/test_lost_network_interface.py
  • test_cluster_waiters/test_rabbitmq_start_retry.py
  • test_kafka_bad_messages/test_admin_client_helper.py
  • test_kafka_bad_messages/test_delete_topic_helper.py
  • test_prometheus_protocols/test_promqltest_loader.py
  • test_spark_session_recovery/test.py
  • test_keeper_sanitizer_logs/test.py
  • test_paimon_spark_smoke/test.py
  • test_keeper_bench_zookeeper/test.py
  • test_play_reconcile_startup/test.py
  • test_play_chart_helpers/test.py
  • test_docs_web_ui_links/test.py
  • test_hive_query/test.py
  • test_storage_rabbitmq/test_shutdown.py
  • test_e2e_catalogs/test.py
  • test_user_query_log_config_validation/test.py
  • test_user_query_log_distributed_backend/test.py
  • test_wasm_udf_fail_close/test.py
  • test_insert_deduplication_version_guard/test.py
  • test_thread_pool_queue_size/test.py
  • test_naive_bayes_xml_dictionary/test.py
  • test_replicated_database_active_node_taken/test.py
  • test_mutation_analyzer_setting/test.py
  • test_sql_security_analyzer_setting/test.py
  • test_database_hdfs_url_allowlist/test.py
  • test_executable_udf_profile_events/test.py
  • test_executable_pool_udf_profile_events/test.py
  • test_storage_s3_queue/test_dimensional_metrics.py
  • test_memory_tracker_large_allocation_trace/test.py
  • test_jemalloc_profiler_sampling_rate/test.py
  • test_jemalloc_merge_tree_arenas/test.py
  • test_concurrent_part_removal_threshold_for_remote_disk/test.py
  • test_keeper_memory_soft_limit_ratio/test.py
  • test_keeper_nuraft_streaming/test.py
  • test_keeper_slow_connection_log/test.py
  • test_keeper_commit_readahead_no_reset/test.py
  • test_parallel_table_shutdown/test.py
  • test_system_zookeeper_watches/test.py
  • test_replicated_database_system_clusters_log_level/test.py
  • test_filesystem_cache_eviction_metrics/test.py
  • test_memory_thread_stacks_metric/test.py
  • test_cgroup_metrics/test.py
  • test_insert_query_profile_events/test.py
  • test_keeper_watch_profile_events/test.py
  • test_keeper_request_total_with_subrequests/test.py
  • test_index_uncompressed_cache_zero_size/test.py
  • test_async_metrics_overload_warning/test.py
  • test_core_dump_size_limit/test.py
  • test_point_in_polygon_cache_size/test.py
  • test_executable_udf_driver_config_reload/test.py
  • test_storage_iceberg_with_spark/test_file_stats_logging.py
  • test_storage_iceberg_with_spark/test_manifest_read_performance.py
  • test_ddl_worker_stale_task_name/test.py
  • test_database_catalog_shutdown_system_logs/test.py
  • test_zookeeper_send_window_broken_promise/test.py
  • test_parallel_replicas_insert_select_coordinator_reuse/test.py
  • test_parallel_replicas_local_replica_forced_inactive/test.py
  • test_parallel_replicas_skip_inactive_replicas_all_groups/test.py
  • test_parallel_replicas_cluster_shadows_replicated_db/test.py
  • test_storage_iceberg_with_spark/test_lifetime_sources_bug.py
  • test_storage_iceberg_no_spark/test_iceberg_inverted_manifest_bounds.py
  • test_storage_iceberg_no_spark/test_iceberg_inverted_delete_bounds.py
  • test_storage_iceberg_no_spark/test_drop_partition_concurrent.py
  • test_broken_detached_part_quarantine/test.py
  • test_cache_s3_object_truncation/test.py
  • test_storage_log_damaged_array/test.py
  • test_zero_copy_drop_table_with_leftover/test.py
  • test_zero_copy_invalidated_system_columns/test.py
  • test_hypothetical_projection_estimate_writes_nothing/test.py
  • test_constraint_subquery_legacy_metadata/test.py
  • test_projection_unavailable_at_startup/test.py
  • test_projection_unavailable_replicated_db/test.py
  • test_totime_legacy_replicated_delete/test.py
  • test_create_dictionary_in_startup_script/test.py
  • test_storage_delta_shuffles/test.py
  • test_system_users_predicate_pushdown/test.py
  • test_rocksdb_backup_restore/test.py
  • test_storage_nats/test_nats_jetstream_credentials_rotation.py
  • test_nullable_tuple_subcolumns/test.py
  • test_named_collections_encrypted2/test_integr.py
  • test_drop_data/test.py
  • test_compatibility_readonly_constrained_setting/test.py
  • test_storage_iceberg_with_spark/test_local_table_safety.py
  • test_storage_s3/test_parquet_prewhere.py
  • test_native_incorrect_data_deserialization/test.py
  • test_concurrent_hash_join_single_join_memory_limit/test.py
  • test_role/test_replicated_ddl_current_roles.py
  • test_limit_by_transform_kill_query/test.py
  • test_aggregating_in_order_transform_kill_query/test.py
  • test_storage_kafka/test_system_stop.py
  • test_storage_nats/test_system_stop.py
  • test_storage_s3_queue/test_system_stop.py
  • test_storage_rabbitmq/test_system_stop.py

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/122485]

Version info

  • Merged into: 26.10.1.905-master (included in 26.10 and later)

The integration test suite often does not fit in its timeout. Many of the
integration tests added since 2026-02 check rare corner cases, test the test
harness or the Web UI JavaScript rather than the server, check how malformed
configs are handled, or only assert that a metric, log line or setting exists.

Remove 111 such test files: 107 low-value ones, plus the four
`test_system_stop.py` modules for streaming engines (Kafka, NATS, RabbitMQ,
S3Queue). The `test_system_stop.py` modules have some value, but together
they take about 1450 s per run, which is too much for what they cover.

Also remove config files and helpers used only by the removed tests, and their
entries in the integration test durations table.

According to CIDB (the week of 2026-09-21), the removed files take about 5.4%
of the integration test time, which is about 4900 USD per week of CI cost.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [7fbb534]

Summary: ✅


AI Review

Summary

This PR removes 111 integration-test modules plus their support files. A substantial subset really is CI noise, but several deleted tests are the only remaining regression coverage for restart/shutdown safety, streaming-engine background controls, and malformed-input handling on public boundaries. I do not think the current set is merge-safe as-is.

Findings

⚠️ Majors

  • [dismissed by author -- https://github.com/Remove low-value integration tests #122485#discussion_r4113388431] [tests/integration/test_database_hdfs_url_allowlist/test.py:30] Removing this still drops the only restart-time coverage I could find for DatabaseHDFS under a tightened remote_url_allow_hosts policy. The remaining allowlist tests cover query-time checks, not the loadMetadata replay path where one persisted HDFS database can prevent the whole server from starting.
  • [dismissed by author -- https://github.com/Remove low-value integration tests #122485#discussion_r4113388435] [tests/integration/test_database_catalog_shutdown_system_logs/test.py:90] This is still the only focused coverage I found for DatabaseCatalog::shutdownImpl when a user database throws in prepare, shutdown, or stopReplication. Without it, a regression can again skip shutdown_system_logs and turn a normal shutdown into an abort or hang.
  • [dismissed by author -- https://github.com/Remove low-value integration tests #122485#discussion_r4113388436] [tests/integration/test_role/test_replicated_ddl_current_roles.py:22] I still cannot find another test that sends system.current_roles / system.enabled_roles through replicated DDL worker execution with default distributed_ddl_use_initial_user_and_roles = 0. Ordinary role tests do not cover the path that previously raised No user in current context.
  • [dismissed by author -- https://github.com/Remove low-value integration tests #122485#discussion_r4113388439] [tests/integration/test_storage_rabbitmq/test_system_stop.py:124] After the deletion there is still no RabbitMQ coverage for SYSTEM STOP, SYSTEM PAUSE, SYSTEM CANCEL, or SYSTEM REFRESH on streaming tables, including the REFRESH / single-worker starvation path noted in StorageRabbitMQ.cpp.
  • [dismissed by author -- https://github.com/Remove low-value integration tests #122485#discussion_r4113388441] [tests/integration/test_storage_s3_queue/test_system_stop.py:160] This remains the only S3Queue / AzureQueue coverage for the unified background controls. The surviving queue tests do not cover the AzureQueue alias dispatch or the one-shot REFRESH semantics while stopped.
  • [dismissed by author -- https://github.com/Remove low-value integration tests #122485#discussion_r4113388443] [tests/integration/test_native_incorrect_data_deserialization/test.py:79] Removing this still deletes the only malformed-Native / Variant regression test I found that proves user-supplied bytes fail with INCORRECT_DATA instead of tripping an internal assertion. That is a public format boundary, not a contrived corrupted-state check.
  • [tests/integration/test_storage_kafka/test_system_stop.py:170] The only Kafka control coverage left after this PR is a SYSTEM STOP / SYSTEM START round-trip in test_intent_sizes.py on StorageKafka only. This file is where PAUSE, CANCEL, and one-shot REFRESH are exercised, and it is also the only coverage for the Keeper-backed StorageKafka2 commit-vs-rollback behavior on in-flight blocks. Removing it leaves a large user-visible command surface effectively untested.
  • [tests/integration/test_storage_kafka/test_keeper_session_loss_direct_read.py:52] I could not find another test for direct reads from an inactive StorageKafka2 after Keeper session expiry returning ABORTED instead of a logical error. That path is user-triggerable through stream_like_engine_allow_direct_select, and the wrong exception class aborts debug/ASan builds.
  • [tests/integration/test_zookeeper_send_window_broken_promise/test.py:2] This is the only coverage I found for the sendThread request window where a throw between dequeuing a request and inserting it into operations must still satisfy the promise and avoid leaking CurrentMetrics::ZooKeeperRequest. The failpoints are still in ZooKeeperImpl.cpp; deleting the regression test means a broken-promise abort or gauge leak can come back unnoticed.
  • [tests/integration/test_refreshable_mv_no_multi_read/test.py:5] The surviving refreshable-MV tests do not cover the restart/ATTACH path on a Keeper that lacks MULTI_READ, nor the constructor/scheduler feature-flag race. This deleted module is what proves those cases disable the view gracefully instead of crash-looping the server on restart with Unexpected exception in refresh scheduling.
Final Verdict

Request changes.

LLVM Coverage Report

Measured on commit 7fbb534.

Metric Baseline Current Δ
Lines 88.20% 87.90% -0.30%
Functions 91.80% 91.70% -0.10%
Branches 79.50% 79.30% -0.20%

Changed lines: Uncovered code analysis did not run: No coverable C/C++ source files changed (contrib/ is excluded from coverage).

Newly covered: +179 lines in 48 files (-3452 lines lost coverage) · Details

Full report

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Sep 26, 2026

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@clickhouse-gh clickhouse-gh Bot added the comp-testing Test content only (no production code). label Sep 27, 2026
@alexey-milovidov alexey-milovidov self-assigned this Sep 28, 2026
…tegration-tests

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
return total


# The per-table verbs are parametrized over `keeper`: keeper=False exercises `StorageKafka`, keeper=True

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this drops more than a redundant SYSTEM STOP smoke test. The only surviving Kafka control coverage I can find is test_intent_sizes.py, which does one STOP/START round-trip on StorageKafka only. This file is where PAUSE, CANCEL, and one-shot REFRESH are exercised, and it is also the only place that covers the Keeper-backed StorageKafka2 durable-boundary differences (offset_guard rollback vs commit on STOP/PAUSE). Those are separate user-visible contracts, so I would keep a trimmed replacement instead of deleting the module outright.

yield


def test_direct_read_from_inactive_table_is_not_a_logical_error(kafka_cluster):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only regression coverage I found for direct reads from an inactive StorageKafka2 after Keeper session expiry failing with ABORTED rather than a logical error. rg only turns up the throw site in StorageKafka2::assertActive; I could not find another test that drives stream_like_engine_allow_direct_select through the inactive-table path. That is a user-facing query path, and in debug/sanitizer builds the wrong exception class aborts the server, so removing the test without a replacement seems unsafe.

@@ -1,128 +0,0 @@
#!/usr/bin/env python3
# Regression tests for Coordination::ZooKeeper::sendThread request-window hazards.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this leaves the sendThread exception-safety window untested. rg still finds the failpoints in ZooKeeperImpl.cpp, but I could not find another test that exercises the promise-completion guard for zk_send_thread_request_window_throw or the "increment ZooKeeperRequest only after the operations insert succeeds" invariant. If that regresses, a single Keeper request can again abort the server with a broken-promise future_error, or leak the in-flight metric indefinitely. I think this needs to stay, or move into a smaller focused test, rather than disappear entirely.


# Regression test for https://github.com/ClickHouse/ClickHouse/issues/106737
#
# A coordinated refreshable materialized view (created in a Replicated database) used to

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This module is not covering a low-value corner case; it is the only restart-time coverage I found for coordinated refreshable materialized views on a Keeper without MULTI_READ. The remaining RMV tests do not exercise the ATTACH/restart path or the constructor-vs-scheduler feature-flag race, so deleting this reopens the class of regressions where a view re-attaches as coordinated, throws NOT_IMPLEMENTED in readZnodesIfNeeded, and the scheduler turns that into a server abort/crash-loop on startup. I would keep this coverage or replace it with an equivalent narrower restart test.

@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Sep 28, 2026
Merged via the queue into master with commit 3a100c7 Sep 28, 2026
150 checks passed
@alexey-milovidov
alexey-milovidov deleted the remove-pointless-integration-tests branch September 28, 2026 11:34
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 28, 2026
pull Bot pushed a commit to AnotherGenZ/ClickHouse that referenced this pull request Sep 29, 2026
`test_iceberg_narrow_manifest_bounds` fails on every master run since
ClickHouse#122679 restored its file:
https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=eb34e3144cb9f262e3b7dc8a6b49e0371dbac2d0&name_0=MasterCI&name_1=Integration%20tests%20%28amd_msan%2C%208%2F8%29

ClickHouse#122681 made `ManifestFileIterator::processRow` decode the bounds of only
the columns the filter uses (`getMinMaxColumnTypes`). The test narrows the
bound of `n` and then greps for the width guard's log line after a read
filtered on `s` alone, which no longer decodes `n`, so the grep returns
nothing. The CI of ClickHouse#122681 did not run this file, because ClickHouse#122485 had
removed it at the time.

The same change made the module's four other checks that a well-formed
column in the same manifest entry keeps pruning vacuous: each filtered on
the well-formed column alone, so the broken bound was never decoded and the
check passed whatever the per-column fallback did.

The five per-column checks now also filter on the broken column. The pruner
keeps one `KeyCondition` per filter column with only that column as key, so
the other column's atom is unknown and the conjunction prunes exactly as the
single-column filter did; the expected counts are unchanged.

Validated with two mutants that make the width guard or the inverted-pair
guard drop min/max pruning for the whole entry instead of one column: each
reddens the new file at exactly the checks of its own guard, while the old
file's checks at those sites stay green.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
otselnik pushed a commit to otselnik/ClickHouse that referenced this pull request Oct 2, 2026
This is a stricter version of ClickHouse#122485,
which was reverted in ClickHouse#122679.

Remove 85 integration test files. They test the integration test harness,
server misconfigurations, corner cases in obscure functionality, contrived or
hand-corrupted states, internal races rebuilt with failpoints, or only assert
that a metric, log line or setting exists.

Unlike the previous attempt, keep the tests related to data lakes (Iceberg,
Delta Lake, Paimon, Hive, catalogs and their helpers, Spark), the
`test_system_stop.py` tests of streaming engines, and a few other tests of real
user-facing behavior.

The durations table in `ci/jobs/scripts/integration_tests_configs.py` is left
unchanged to avoid merge conflicts; entries for files that no longer exist are
ignored.

Also add guidelines against low-value integration tests to `.claude/CLAUDE.md`.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-testing Test content only (no production code). pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants