epugh commented on code in PR #4147:
URL: https://github.com/apache/solr/pull/4147#discussion_r2828583102
##########
solr/core/src/test/org/apache/solr/handler/admin/ShowFileRequestHandlerTest.java:
##########
@@ -119,26 +131,17 @@ public Set<String> getContentTypes() {
}
public void testContentTypeHtmlBecomesTextPlain() {
- SolrRequestHandler handler = h.getCore().getRequestHandler("/admin/file");
- SolrQueryRequest req =
- new SolrQueryRequestBase(
- h.getCore(), params("file", "schema.xml", "contentType",
"text/html"));
- SolrQueryResponse rsp = new SolrQueryResponse();
- handler.handleRequest(req, rsp);
- ContentStreamBase.FileStream content =
- (ContentStreamBase.FileStream) rsp.getValues().get("content");
- assertEquals("text/plain", content.getContentType());
- }
-
- public void testContentTypeHtmlDefault() {
- SolrRequestHandler handler = h.getCore().getRequestHandler("/admin/file");
- SolrQueryRequest req = new SolrQueryRequestBase(h.getCore(),
params("file", "example.html"));
- SolrQueryResponse rsp = new SolrQueryResponse();
- handler.handleRequest(req, rsp);
- ContentStreamBase.FileStream content =
- (ContentStreamBase.FileStream) rsp.getValues().get("content");
- // System attempts to guess content type, but will only return XML, JSON,
CSV, never HTML
- assertEquals("application/xml", content.getContentType());
+ try (SolrCore core =
solrTestRule.getCoreContainer().getCore("collection1")) {
Review Comment:
whyis this called "collection1"? that's ugly. SHouldn't it be called
"core1"?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]