Repository navigation
Remove low-value integration tests (stricter selection) - #123165
Conversation
This is a stricter version of #122485, which was reverted in #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]>
|
Workflow [PR], commit [4cbdcbc] Summary: ✅ AI ReviewSummaryThis PR removes 85 integration tests plus their helper/config files and adds guidance for avoiding expensive low-signal integration coverage. The cleanup direction makes sense in general, but a few of the deleted tests are not harness trivia or generic misconfiguration checks: they are the only regression coverage I could find for supported upgrade and migration contracts. Because those contracts are easy to break while refactoring validation and metadata loading, I would keep or replace those tests before merging. Findings
Final Verdict
LLVM Coverage ReportMeasured on commit 4cbdcbc.
Changed lines: Uncovered code analysis did not run: No coverable C/C++ source files changed (contrib/ is excluded from coverage). Newly covered: +145 lines in 47 files (-2067 lines lost coverage) · Details |
|
Very much LGTM, indeed. |
This is a stricter version of #122485, which was reverted in #122679.
The number of integration tests keeps growing without control. An integration test costs an order of magnitude more than a functional test: in CI resources, in amount of code, and in the effort to read, debug and maintain it. Many recently added integration tests fall into these categories:
This PR removes 85 such test files, plus config files and a helper that only these tests used.
Compared to the previous attempt, the following are kept, following the review feedback:
test_storage_delta_shufflesand the Iceberg inverted-bounds compatibility tests;test_system_stop.pytests of the streaming engines (Kafka, NATS, RabbitMQ, S3Queue);test_refreshable_mv_no_multi_read, because Apache ZooKeeper does not haveMULTI_READ, so this is a real deployment;test_storage_s3_queue/test_file_iterator_lost_lock.py(S3Queue exactly-once processing),test_parallel_replicas_alias_columns,test_concurrent_hash_join_single_join_memory_limit,test_storage_s3/test_parquet_prewhere.py, the/playWeb UI tests, and the skippedtest_storage_rabbitmq/test_shutdown.py.The durations table in
ci/jobs/scripts/integration_tests_configs.pyis left unchanged to avoid merge conflicts with the private repository. Entries for files that no longer exist are not used.This PR also adds guidelines against these kinds of integration tests to
.claude/CLAUDE.md, and states there that interoperability tests with data lakes, catalogs and Spark are valuable.Estimated savings: the removed files take about 2.8% of the integration test time, about 3,000 USD of CI cost per week out of about 107,000 USD for integration tests. This uses per-test durations from CIDB for the week starting 2026-09-21 and AWS on-demand prices.
Removed tests
The time is the average sum of test durations per run of
Integration tests (arm_binary, distributed plan)on master. It is higher under sanitizers.test_keeper_http_jemalloc/test.py/jemallocdebug web UI pages. These are debug pages, and the check needs neither a Keeper ensemble nor an integration test.test_unknown_config_option/test.pyUNKNOWN_ELEMENT_IN_CONFIGis raised.test_storage_kafka/test_keeper_session_loss_direct_read.pySELECTfrom an inactiveKafka2table after Keeper session loss returnsABORTED. Waits up to 600 s for the table to become inactive in order to check one error code.test_executable_udf_async_metrics/test.pytest_keeper_container_nodes/test_disabled.pytest_keeper_ttl_nodes/test_disabled.pytest_http_handlers_config_error/test.pyhttp_handlersconfig and check which error is reported.test_refreshable_mv_watch_fault/test.pysleepEachRowrefresh, to check thatRefreshTaskre-registers its watch.test_rmv_access_denied_on_rename_race/test.pySYSTEM REFRESHon one default server, hunting for a race. A green run proves nothing.test_storage_kafka/test_poll_timeout_after_assignment.pytest_phantom_parts_in_mutations/test.pytest_http_connection_socket_buffer_settings/test.pysystem.server_settings, that out-of-range values are logged on reload, and parsesssoutput for the kernel socket buffer size.test_intersect_or_except_kill_query/test.pyKILL QUERYis noticed in the middle of anIntersectOrExceptTransformchunk, which pins an implementation detail of the cancellation loop.test_statistics_non_physical_upgrade/test.pySTATISTICSdeclaration on a non-physical column, which only 26.4 accepted, with 7ALTERvariants on that state.test_storage_nats/test_nats_jetstream_credentials_rotation.pytest_executable_udf_profile_events/test.pytest_named_collections_encrypted2/test_integr.pys3/s3Cluster/url/backup/S3Queuescenarios with named collections, where the encrypted Keeper storage is incidental to what is checked. The core encrypted-named-collections coverage remains intest_named_collections_encrypted2/test.py.test_keeper_commit_readahead_no_reset/test.pytest_ddl_worker_stale_task_name/test.pyDDLWorkerreinitialization, and checks that a debug-assertion log line is absent.test_database_catalog_shutdown_system_logs/test.pytest_storage_s3_queue/test_dimensional_metrics.pyS3Queuedimensional metrics exist and have values.test_replicated_database_active_node_taken/test.pyCREATE DATABASE ... ON CLUSTERwith literal shard and replica names so that two hosts share a replica, then checks the error code.test_zero_copy_drop_table_with_leftover/test.pytest_zookeeper_send_window_broken_promise/test.pysendThread, a path that is reachable only with failure injection.test_nullable_tuple_subcolumns/test.pytest_memory_tracker_large_allocation_trace/test.pytest_rocksdb_backup_restore/test.pyEmbeddedRocksDBtables withread_onlyand a sharedrocksdb_dir, in 8 variants.test_zero_copy_invalidated_system_columns/test.pytest_executable_pool_udf_profile_events/test.pyexecutable_poolUDFs is non-zero.test_projection_unavailable_replicated_db/test.pyReplicateddatabase replicas with differentenable_positional_arguments_for_projections.test_constraint_subquery_legacy_metadata/test.pydictGetorjoinGet.test_projection_unavailable_at_startup/test.pytest_wasm_udf_fail_close/test.pywebassembly_udf_enginevalue is rejected at startup.test_user_query_log_config_validation/test.pyquery_log.tableisuser_query_log.test_keeper_bench_zookeeper/test.pykeeper-benchdeveloper tool against Apache ZooKeeper, not the server.test_jemalloc_profiler_sampling_rate/test.pytest_broken_detached_part_quarantine/test.pydetached/, followed by replica drop and restore, to exercise an extremely rare error path.test_parallel_replicas_skip_inactive_replicas_all_groups/test.pyall_groups.<db>) for parallel replicas coordinator sizing, checked by a log line. The main case remains intest_parallel_replicas_skip_inactive_replicas.test_concurrent_part_removal_threshold_for_remote_disk/test.pytest_parallel_table_shutdown/test.pytest_create_dictionary_in_startup_script/test.pysystemdatabase.test_totime_legacy_replicated_delete/test.pyDELETEin aReplicateddatabase with legacytoTimeinside a SQL UDF, under the oldest DDL entry format.test_parallel_replicas_insert_select_coordinator_reuse/test.pytest_keeper_memory_soft_limit_ratio/test.pySIGHUPto Keeper and checks that a log line with the setting value changes.test_system_zookeeper_watches/test.pysystem.zookeeper_watchesshows a new session id afterSYSTEM RECONNECT ZOOKEEPER.test_jemalloc_merge_tree_arenas/test.pytest_parallel_replicas_local_replica_forced_inactive/test.pytest_parallel_replicas_cluster_shadows_replicated_db/test.pyReplicateddatabase, checked by a coordinator log line.test_replicated_database_system_clusters_log_level/test.pytest_role/test_replicated_ddl_current_roles.pyCREATE TABLE ... AS SELECT FROM system.current_rolesexecuted by theReplicateddatabase DDL worker.test_cache_s3_object_truncation/test.pytest_storage_log_damaged_array/test.pyLog/TinyLogfiles on disk.test_keeper_sanitizer_logs/test.pystderr.logcollection and detection of sanitizer markers atcluster.shutdown.test_keeper_slow_connection_log/test.pytest_insert_deduplication_version_guard/test.pyinsert_deduplication_versionvalue.test_database_hdfs_url_allowlist/test.pyHDFSdatabase pointing to a non-existent host, thenremote_url_allow_hostsis tightened and the server restarted.test_limit_by_transform_kill_query/test.pyLimitByTransformto check where an internal cancellation check is placed.test_filesystem_cache_eviction_metrics/test.pytest_point_in_polygon_cache_size/test.pySYSTEM DROPcommand empties the cache.test_sql_security_analyzer_setting/test.pytest_keeper_nuraft_streaming/test.pyconfcommand and in a log line.test_kafka_bad_messages/test_delete_topic_helper.pytest_drop_data/test.py02932_query_settings_max_size_drop*andtest_reload_max_table_size_to_drop.test_insert_query_profile_events/test.pyInsertQuery/AsyncInsertQuerycounters increase.test_index_uncompressed_cache_zero_size/test.pytest_compatibility_readonly_constrained_setting/test.pytest_naive_bayes_xml_dictionary/test.pyNAIVE_BAYESXML dictionary definitions.test_aggregating_in_order_transform_kill_query/test.pyAggregatingInOrderTransformand the test counts aLOG_TESTmarker to check where an internal cancellation check is placed.test_mutation_analyzer_setting/test.pyallow_experimental_analyzer = 0.test_memory_thread_stacks_metric/test.pyMemoryThreadStacks*asynchronous metrics are populated.test_hypothetical_projection_estimate_writes_nothing/test.pyEXPLAIN WHATIFdoes not delete a hand-planted temporary projection directory inside a part.test_kafka_bad_messages/test_admin_client_helper.pytest_user_query_log_distributed_backend/test.pyquery_logwith theDistributedengine makessystem.user_query_logthrow.test_system_users_predicate_pushdown/test.pyusers_xmlstorages.test_native_incorrect_data_deserialization/test.pyNativebytes with an inconsistentVariant, read withclickhouse-local. A narrow regression for one malformed input, and it does not need an integration test.test_cluster_waiters/test_lost_network_interface.pyhelpers/cluster.py) with stubs. It does not start the server.test_keeper_watch_profile_events/test.pyKeeperWatchTriggered*profile events increase.test_executable_udf_driver_config_reload/test.pySYSTEM RELOAD CONFIG.test_keeper_request_total_with_subrequests/test.pytest_core_dump_size_limit/test.pyrlimitchanges afterSYSTEM RELOAD CONFIG.test_thread_pool_queue_size/test.pyqueue_size = UINT64_MAX. Already covered by a unit test from the same PR.test_async_metrics_overload_warning/test.pysystem.warningsafter startup.test_cluster_waiters/test_rabbitmq_start_retry.pywait_rabbitmq_to_start) with stubs. It does not start the server.test_prometheus_protocols/test_promqltest_loader.pypromqltest_loader.pyparser. It does not start the server.test_cluster_waiters/test_exec_in_container_detach.pyexec_in_container) with stubs. It does not start the server.Changelog category (leave one):
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/123165]
Version info
26.10.1.1263-master(included in26.10and later)