Skip to content

Add ability to specify buffer sizes#59

Merged
garydgregory merged 3 commits intoapache:masterfrom
boris-petrov:add-ability-to-specify-buffer-sizes
Apr 25, 2019
Merged

Add ability to specify buffer sizes#59
garydgregory merged 3 commits intoapache:masterfrom
boris-petrov:add-ability-to-specify-buffer-sizes

Conversation

@boris-petrov
Copy link
Copy Markdown
Contributor

@garydgregory
Copy link
Copy Markdown
Member

See comments in individual farms.
The new public methods are missing unit tests.

@boris-petrov boris-petrov force-pushed the add-ability-to-specify-buffer-sizes branch from 2f65ed6 to e51ab5b Compare April 24, 2019 13:38
@boris-petrov
Copy link
Copy Markdown
Contributor Author

I'm not sure what kind of tests to write. This is pretty much not adding any new functionality, just exposing an API that Java already has. Any ideas?

@boris-petrov boris-petrov force-pushed the add-ability-to-specify-buffer-sizes branch from e51ab5b to 50264c7 Compare April 24, 2019 14:03
@garydgregory
Copy link
Copy Markdown
Member

I'm not sure what kind of tests to write. This is pretty much not adding any new functionality, just exposing an API that Java already has. Any ideas?

Suggestions for tests:

  • Validate input:
    -- What happens when I pass in a negative number?
    -- What happens when I pass in 0?
  • Do I really get a buffer sized N? IOW, is the parameter used at all?

@boris-petrov boris-petrov force-pushed the add-ability-to-specify-buffer-sizes branch from 50264c7 to 282d784 Compare April 24, 2019 15:05
@boris-petrov
Copy link
Copy Markdown
Contributor Author

OK, I pushed a couple of tests. They depend on the fact that the BufferedInput/OutputStream constructors check the size argument and throw an exception if it is <= 0. Unfortunately I can't check the buffer size as it is a protected variable in the class (unless we expose it in the MonitorInput/OutputStream classes which would be ugly).

@boris-petrov boris-petrov force-pushed the add-ability-to-specify-buffer-sizes branch from 282d784 to b0b3208 Compare April 24, 2019 15:30
@boris-petrov boris-petrov force-pushed the add-ability-to-specify-buffer-sizes branch from b0b3208 to 0d3be73 Compare April 24, 2019 20:14
@boris-petrov
Copy link
Copy Markdown
Contributor Author

Javadoc comments fixed.

@boris-petrov boris-petrov force-pushed the add-ability-to-specify-buffer-sizes branch from 0d3be73 to e686d28 Compare April 24, 2019 20:17
@boris-petrov boris-petrov force-pushed the add-ability-to-specify-buffer-sizes branch from e686d28 to d613d99 Compare April 24, 2019 20:28
@garydgregory garydgregory merged commit ec5eb96 into apache:master Apr 25, 2019
asfgit pushed a commit that referenced this pull request Apr 25, 2019
@boris-petrov boris-petrov deleted the add-ability-to-specify-buffer-sizes branch May 7, 2019 07:51
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.

2 participants