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

Revert commit for e638c17 and added new test #861

Merged
merged 3 commits into from
Oct 27, 2021
Merged

Revert commit for e638c17 and added new test #861

merged 3 commits into from
Oct 27, 2021

Conversation

shanmsac
Copy link
Contributor

@shanmsac shanmsac commented Oct 27, 2021

Description of changes:
Reverting the use of Java 8 for computing lease count. Lease can be without owners and groupingBy does not accept null key.
Added new unit test.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The change caused a regression for leases without owners.
Added unit test.
@shanmsac shanmsac changed the title Revert commit for e638c17. Revert commit for e638c17 and added new test Oct 27, 2021
when(metricsFactory.createMetrics()).thenReturn(new NullMetricsScope());
when(timeProvider.call()).thenReturn(1000L);

Map<String, Lease> actualOutput = dynamoDBLeaseTaker.takeLeases(timeProvider);
Copy link
Contributor

Choose a reason for hiding this comment

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

is it possible to test against expiredLeases? can we change computeLeasesToTake to visible to test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added additional test

Copy link
Contributor

@avahuang0429 avahuang0429 left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants