-
Notifications
You must be signed in to change notification settings - Fork 566
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
Content-length optimization #773
Conversation
… mark them as immutable. Updated and created some new tests. Signed-off-by: Santiago Pericas-Geertsen <[email protected]>
common/http/src/main/java/io/helidon/common/http/DataChunk.java
Outdated
Show resolved
Hide resolved
* @throws Exception in case of an error | ||
*/ | ||
private static void startServer(int port) throws Exception { | ||
webServer = WebServer.create( |
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.
I know this looks inspired from PlainTest, but @tomas-langer is advocating for not starting actual servers in unit tests in favor of mocking.
IIRC the idea is to have tests that do start real servers to be under /tests/functional or /tests/integration.
I don't see much under /tests at the moment, so this would mean more work to get this going.
Perhaps you can get a pass for now until we setup the integration tests properly.
Thoughts ?
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.
I struggle with this all the time. Recently, for another issue, I created a new functional test called context-propagation
, but this isn't a very efficient way of writing tests because, as of now, every functional test is there for essentially one purpose. If we had something more generic (like webserver) that we could easily extend, it would be a much more efficient way of writing tests.
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.
I agree, we need to setup a module under tests for the webserver integration / functional tests.
Signed-off-by: Santiago Pericas-Geertsen <[email protected]>
Signed-off-by: Santiago Pericas-Geertsen <[email protected]>
https://github.com/oracle/helidon/blob/ca0e11f/webserver/webserver/src/main/java/io/helidon/webserver/BareResponseImpl.java#L227 - use of |
Added new flag to DataChunk to mark them as immutable. Updated and created some new tests.
Signed-off-by: Santiago Pericas-Geertsen [email protected]