-
Notifications
You must be signed in to change notification settings - Fork 291
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
[Work In Progress] [POOL-238] Improve test generics #374
base: master
Are you sure you want to change the base?
Conversation
@garydgregory I have created a draft pull request for you to review at https://github.com/apache/commons-pool/pull/374 . There is some finishing touches still required but I want to know if this is something you would consider worth reviewing, Let me know your thoughts on this. |
…odCallPoolableObjectFactory.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @rajucomp
I am sorry but this PR is too way big and messy to review. If this is about generics, then ONLY make it about generics please. The PR adds Mockito which is not needed to test generics IMO. There are also cosmetic changes it seems. A PR should be focused. I'd rather see effort in fixing bugs than picking up an 11 year old Jira ticket.
public String create() { | ||
return String.valueOf(counter++); | ||
public T create() { | ||
return (T)String.valueOf(counter++); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not make sense to me. What am I missing? If I declare a SimpleFactory<Integer, RuntimeException>, what happens?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. That will be cleaned up.
The way the tests are currently being tested is not efficient. We use a class called Later, I can raise a PR that includes Mockito changes. Does that make sense ? |
@rajucomp |
Thanks for your contribution to Apache Commons! Your help is appreciated!
Before you push a pull request, review this list:
mvn
; that'smvn
on the command line by itself.