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

Enable AVM inside BulkExecuter based on given config #826

Merged
merged 1 commit into from Feb 19, 2019

Conversation

AlexandraRoatis
Copy link
Contributor

Description

Ensures the AVM is used only when enabled.

Type of change

Insert x into the following checkboxes to confirm (eg. [x]):

  • Bug fix.
  • New feature.
  • Enhancement.
  • Unit test.
  • Breaking change (a fix or feature that causes existing functionality to not work as expected).
  • Requires documentation update.

Testing

Please describe the tests you used to validate this pull request. Provide any relevant details for test configurations as well as any instructions to reproduce these results.

  • existing tests + sync on mastery

Verification

Insert x into the following checkboxes to confirm (eg. [x]):

  • I have self-reviewed my own code and conformed to the style guidelines of this project.
  • New and existing tests pass locally with my changes.
  • I have added tests for my fix or feature.
  • I have made appropriate changes to the corresponding documentation.
  • My code generates no new warnings.
  • Any dependent changes have been made.

@AlexandraRoatis AlexandraRoatis added the bug Something isn't working label Feb 14, 2019
@AlexandraRoatis AlexandraRoatis added this to the 0.3.3 milestone Feb 14, 2019
@AlexandraRoatis AlexandraRoatis self-assigned this Feb 14, 2019
Copy link
Collaborator

@AionJayT AionJayT left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -55,6 +55,12 @@
public class BulkExecutor {
private static final Object LOCK = new Object();

private static boolean avmEnabled = false;

public static void enabledAvmCheck(boolean isEnabled) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a big fan of this means of passing the value. It puts the burden of knowing how to use an internal detail on the caller, when the bulk executor can grab this answer itself internally without any assistance from the config. A detail like this will eventually leak into unit tests, for example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I understand your point of view, but the caller should be in charge of directing behavior here. If every class queries the config when it chooses there is more potential for errors (especially when you consider that the config is malleable and something like the GUI may choose to edit it) than if one entity directs overall behavior. The tests should be written to consider both AVM enabled and disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants