You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2014/09/03 07:16:51 UTC
[jira] [Updated] (SOLR-4406) RawResponseWriter - doesn't use the
configured "base" writer.
[ https://issues.apache.org/jira/browse/SOLR-4406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hoss Man updated SOLR-4406:
---------------------------
Attachment: SOLR-4406.patch
bq. ...I didn't go the mocking route, instead it is an integration test by spinning up a core to assert 3 different cases:
You're reasoning makes sense, but it was hard to really see that that's what your tests was doing the way you had it organized -- and none of your existing tests really dealt with the situation where the base writer was _also_ implemented BinaryQueryResponseWriter. There was also a bit of a code smell for me in the way you constructed the RawResponseWriter in one place, but called init() on it (sometimes) in another.
So i took a stab at refactoring it to have test methods that more directly modeled the list of situations you identified, in addition to adding more comments spelling out exactly what each method is doing.
I also made a few trivial tweaks to QueryResponseWriterUtil...
* license at top of file - not class doc
* brief class doc
* switch class to final w/private constructor
* beef up method javadocs
What do you think?
> RawResponseWriter - doesn't use the configured "base" writer.
> -------------------------------------------------------------
>
> Key: SOLR-4406
> URL: https://issues.apache.org/jira/browse/SOLR-4406
> Project: Solr
> Issue Type: Bug
> Components: Response Writers
> Affects Versions: 4.0
> Reporter: Steve Davids
> Attachments: SOLR-4406.patch, SOLR-4406.patch, SOLR-4406.patch, SOLR-4406.patch, SOLR-4406.patch, SOLR-4406.patch
>
>
> The RawResponseWriter accepts a configuration value for a "base" ResponseWriter if no ContentStream can be detected. The line of code is commented out that would allow this secondary response writer to work. It would be great to uncomment the line and provide an OutputStreamWriter as the writer argument.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org