Skip to content

Conversation

@yanxinyi
Copy link
Contributor

No description provided.

@yanxinyi
Copy link
Contributor Author

Added a getProperties function in order to have functional tests.

exit.expectSystemExitWithStatus(1);
Pherf.main(args);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see a test for bad values of this passed in, non-integer negative etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sad path added

String[] args = {"-listFiles"};
Pherf pherf = new Pherf(args);
Properties prop = pherf.getProperties();
assertEquals(Long.valueOf(PherfConstants.LOG_PER_NROWS),
Copy link
Contributor

Choose a reason for hiding this comment

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

Having a constant called LOG_PER_NROWS and another called LOG_PER_N_ROWS in the same class is pretty confusing, especially when one refers to a key and the other to a value. :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will change LOG_PER_N_ROWS to LOG_PER_NROWS_NAME

PherfConstants constants = PherfConstants.create();
assertNotNull(constants.getProperty("pherf.default.dataloader.threadpool"));
assertNotNull(constants.getProperty("pherf.default.results.dir"));
assertNotNull(constants.getProperty("pherf.default.log_per_nrows"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Should use constant for the string

Copy link
Contributor Author

Choose a reason for hiding this comment

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

used constant PherfConstants.LOG_PER_NROWS_NAME instead of string

@yanxinyi
Copy link
Contributor Author

Thanks for the reviewing @dbwong @gjacoby126 :)

Copy link
Contributor

@dbwong dbwong left a comment

Choose a reason for hiding this comment

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

+1

@yanxinyi
Copy link
Contributor Author

do you have any suggestions here @gjacoby126

Copy link
Contributor

@gjacoby126 gjacoby126 left a comment

Choose a reason for hiding this comment

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

+1, thanks @yanxinyi

@gjacoby126 gjacoby126 merged commit 7d29ab5 into apache:master Sep 17, 2019
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.

3 participants