Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lower the batch sizes to also test multiple batches being processed #283

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ module AwsRefresherSpecCommon
].freeze

def stub_refresh_settings(settings)
# TODO(lsmola) extract the batch sizes to the settings and stub the settings instead
# Lower batch sizes to test multiple batches for each collection
allow_any_instance_of(ManagerRefresh::InventoryCollection).to receive(:batch_size).and_return(4)
allow_any_instance_of(ManagerRefresh::InventoryCollection).to receive(:batch_size_pure_sql).and_return(4)
Copy link
Member

Choose a reason for hiding this comment

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

I dislike allow_any_instance_of this is a good reason why the batch size should be configurable


stub_settings_merge(
:ems_refresh => {
:ec2 => settings,
Expand Down