You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Yonik Seeley <yo...@apache.org> on 2007/03/29 22:46:49 UTC
DispatchFilter processing for tests (filling in streams)
Is there a good example (or an existing convenience method) that
duplicates much of the logic of SolrDispatchFilter for test cases?
The main thing I think is missing over just creating a
LocalQueryRequest is the filling in of the streams.
SolrRequestParser.parse() takes an HttpServletRequest argument, which
we don't have with a local test.
Perhaps LocalQueryRequest should set streams or override
getContentStreams() so nothing else would need to be done?
-Yonik
Re: DispatchFilter processing for tests (filling in streams)
Posted by Chris Hostetter <ho...@fucit.org>.
: Should this non-servlet specific stuff be moved out of the servlet
: package, since it's independent? It does seem like it should be
: factored out a little more so that event listeners, etc, can use
: things like "stream.file" or "stream.body"
yeah, it makes sense to refactor anything not explicilty depending on
javax.servlet.** out of webapp and into the main src tree, so that it can
be used in tests.
-Hoss
Re: DispatchFilter processing for tests (filling in streams)
Posted by Yonik Seeley <yo...@apache.org>.
It looks like the majority of the logic is in
SolrRequestParsers.buildRequestFrom()
with some other small additions, like adding "path" to the context.
Should this non-servlet specific stuff be moved out of the servlet
package, since it's independent? It does seem like it should be
factored out a little more so that event listeners, etc, can use
things like "stream.file" or "stream.body"
-Yonik
On 3/29/07, Yonik Seeley <yo...@apache.org> wrote:
> Is there a good example (or an existing convenience method) that
> duplicates much of the logic of SolrDispatchFilter for test cases?
> The main thing I think is missing over just creating a
> LocalQueryRequest is the filling in of the streams.
>
> SolrRequestParser.parse() takes an HttpServletRequest argument, which
> we don't have with a local test.
>
> Perhaps LocalQueryRequest should set streams or override
> getContentStreams() so nothing else would need to be done?
>
> -Yonik
>