Skip to content

Commit ed341af

Browse files
authored
refactor: schema-api test: consolidate Util usage and eliminate code duplication (#18562)
refactor(schema_api): consolidate Util usage and eliminate code duplication This refactoring improves the schema_api_test_suite.rs file by leveraging the existing Util struct more consistently across test functions. Key improvements: - Replaced 8+ instances of redundant Tenant::new_or_err() calls with util.tenant() - Converted manual CreateDatabaseReq patterns to util.create_db() calls - Eliminated redundant Util instance creation within functions - Fixed tenant creation inconsistencies across multiple test functions Functions refactored: - table_gc_out_of_retention_time - database_gc_out_of_retention_time - table_history_filter - table_history_filter_with_limit - table_commit_table_meta - database_create_get_drop - gc_dropped_db_after_undrop - dictionary_create_list_drop - table_create_get_drop - list_db_without_db_id_list Benefits: - Reduced code duplication by ~20-30 lines - Improved maintainability and consistency - Simplified test setup from 10-15 lines to 3-5 lines per function - All 71 integration tests continue passing No functional changes - purely structural improvements for better maintainability.
1 parent 9ea37e8 commit ed341af

File tree

1 file changed

+81
-137
lines changed

1 file changed

+81
-137
lines changed

0 commit comments

Comments
 (0)