Fix RuboCop Metrics/AbcSize offense in test_bind_int32#1039
Conversation
Split test_bind_int32 into three focused tests to reduce ABC complexity: - test_bind_int32_with_smallint: Tests INT32 binding to SMALLINT column - test_bind_int32: Tests INT32 binding to INTEGER column (main use case) - test_bind_int32_with_bigint: Tests INT32 binding to BIGINT column This reduces ABC complexity from 20.22 to within the limit of 17.
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThe pull request expands test coverage for binding 32-bit integer values to different DuckDB column types by adding three new test cases that validate int32 binding behavior against SMALLINT, INTEGER, and BIGINT columns. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Warning Tools execution failed with the following error: Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error) Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes the RuboCop offense:
Changes
Split
test_bind_int32into three focused tests, each testing binding to a different integer column type:test_bind_int32_with_smallint: Tests INT32 binding to SMALLINT columntest_bind_int32: Tests INT32 binding to INTEGER column (main use case)test_bind_int32_with_bigint: Tests INT32 binding to BIGINT columnThis approach reduces the ABC complexity from 20.22 to within the limit of 17, making each test simpler and more focused.
Testing
bundle exec rubocop test/duckdb_test/prepared_statement_test.rb- Offense resolved (9 → 8 offenses)bundle exec rake test- All tests pass (478 runs, 1117 assertions, 0 failures)Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.