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

Conversation

Ladas
Copy link
Contributor

@Ladas Ladas commented Aug 11, 2017

Depends on:

Lower the batch sizes to also test multiple batches being processed

@Ladas Ladas added the test label Aug 11, 2017
@Ladas Ladas force-pushed the mock_batch_sizes_to_also_test_multiple_batches_being_processed branch from 859d6a2 to 75a78fc Compare August 15, 2017 08:43
Lower the batch sizes to also test multiple batches being processed
@Ladas Ladas force-pushed the mock_batch_sizes_to_also_test_multiple_batches_being_processed branch from 75a78fc to 371fe86 Compare August 15, 2017 09:06
@miq-bot
Copy link
Member

miq-bot commented Aug 15, 2017

Some comments on commit Ladas@371fe86

spec/models/manageiq/providers/amazon/aws_refresher_spec_common.rb

  • ⚠️ - 44 - Detected allow_any_instance_of. This RSpec method is highly discouraged, please only use when absolutely necessary.
  • ⚠️ - 45 - Detected allow_any_instance_of. This RSpec method is highly discouraged, please only use when absolutely necessary.

1 similar comment
@miq-bot
Copy link
Member

miq-bot commented Aug 15, 2017

Some comments on commit Ladas@371fe86

spec/models/manageiq/providers/amazon/aws_refresher_spec_common.rb

  • ⚠️ - 44 - Detected allow_any_instance_of. This RSpec method is highly discouraged, please only use when absolutely necessary.
  • ⚠️ - 45 - Detected allow_any_instance_of. This RSpec method is highly discouraged, please only use when absolutely necessary.

@miq-bot
Copy link
Member

miq-bot commented Aug 15, 2017

Checked commit Ladas@371fe86 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
1 file checked, 0 offenses detected
Everything looks fine. 🍪

# 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

Copy link
Member

@agrare agrare left a comment

Choose a reason for hiding this comment

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

This LGTM but lets make sure to follow up and make the batch_size configurable

@agrare agrare merged commit 0b97e81 into ManageIQ:master Aug 24, 2017
@agrare agrare added this to the Sprint 68 Ending Sep 4, 2017 milestone Aug 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants