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

Fixed memory label to align to CASSANDRA-9692 #485

Merged
merged 1 commit into from
Mar 30, 2016

Conversation

jkni
Copy link
Contributor

@jkni jkni commented Mar 29, 2016

CASSANDRA-9692 unifies/improves logging/output of data sizes and rates throughout C*.

As part of this normalization, it changes the output of nodetool info to use the correct SI prefixes. The only dependency on this I could locate for CCM is in its parsing of the nodetool info output. This parsing happens in a function without the C* version available, so we can't do a version check to determine correct units. This PR proposes the easy route of supporting both unit types; another option is to refactor the tests/call sites to pass in a C* version, so that we can decide based on version.

(Please note that I'm reviewer for the above ticket, not assignee. PRing this since it is a new contributor and managing a C* ticket/CCM PR/dtest PR isn't the easiest thing).


for info in infos:
with self.assertRaises(RuntimeError):
ccmlib.node._get_load_from_info_output(info)

def test_gets_correct_value(self):
info_value = [('Load : 328.45 KB', decimal.Decimal('328.45')),
('Load : 295.72 MB', decimal.Decimal('295.72') * 1024),
('Load : 183.79 GB',
Copy link
Contributor

Choose a reason for hiding this comment

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

We still want correct handling of GB on versions that use it, so could you add tests for the GiB behavior, rather than replacing these? (and the same for other X{,i}B units)

Copy link
Contributor

Choose a reason for hiding this comment

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

(I realize that this means asking you to fix tests that were broken when you got here. Sorry about that)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea - done!

Copy link
Contributor

Choose a reason for hiding this comment

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

They look great, +1 from me on the changes to the tests based on visual inspection.

@ptnapoleon
Copy link
Contributor

+1

@ptnapoleon ptnapoleon merged commit 326c9b2 into riptano:master Mar 30, 2016
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

3 participants