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/08/19 06:59:19 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=14101852#comment-14101852 ] 

Hoss Man commented on SOLR-4406:
--------------------------------

Interesting ... looks like this bit of the contract was broken by SOLR-2263 -- i'm guessing it didn't occur to folks at the time that making the RawResponeWriter implement BinaryQueryResponseWriter would essentially cause the Writer based method to be effectively dead code (and since they couldn't assume the "base" writer would support BinaryResponseWriter, throwing an exception probably seemed appropriate)

Steve: at first glance, your patch looks fine and straight forward to me ... but i'm hesitant to commit it w/o some tests to verify it works and help ensure we don't break this again in the future.  I don't suppose you'd be interested in writing some unit tests to help excercise this feature with both code-paths of base writers (bin and non-bin?)

something along the lines of...
* 2 mock writers, one extending BinaryQueryResponseWriter, both throwing UnSupOp for the method that shouldn't be used
* 3 instances of RawResponseWriter, one each with the base and one w/o any base
* 2 mock QueryResponses, one with a CONTENT stream of a spcial Content-Type and one with simple data
* assert expected Content-Type returned, and expected input recieved by the methods on the mock writers, for all 3*2 permutations of RawResponesWriter instances and QueryResponses

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
>
>
> 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.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org