Testing UpdateProcessorChain

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Testing UpdateProcessorChain

Grant Ingersoll-2
Anyone have any thoughts on testing UpdateProcessorChain (and Factory).  In looking at the Signature (dedup) tests, it seems a little clunky, yet the Solr base test class adoc (and related methods) don't seem to support specifying the Update handler to hit.

Thoughts?

-Grant
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Testing UpdateProcessorChain

Yonik Seeley-2-2
On Sun, Dec 5, 2010 at 3:28 PM, Grant Ingersoll <[hidden email]> wrote:
> Anyone have any thoughts on testing UpdateProcessorChain (and Factory).  In looking at the Signature (dedup) tests, it seems a little clunky, yet the Solr base test class adoc (and related methods) don't seem to support specifying the Update handler to hit.

You can specify an alternate update processor with any update command.
SolrTestCaseJ4 has this:
  public static String add(XmlDoc doc, String... args) {

so... you should be able to do something like
add(doc("id","10"),"update.processor","foo")

-Yonik
http://www.lucidimagination.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Testing UpdateProcessorChain

Grant Ingersoll-2

On Dec 5, 2010, at 3:34 PM, Yonik Seeley wrote:

> On Sun, Dec 5, 2010 at 3:28 PM, Grant Ingersoll <[hidden email]> wrote:
>> Anyone have any thoughts on testing UpdateProcessorChain (and Factory).  In looking at the Signature (dedup) tests, it seems a little clunky, yet the Solr base test class adoc (and related methods) don't seem to support specifying the Update handler to hit.
>
> You can specify an alternate update processor with any update command.
> SolrTestCaseJ4 has this:
>  public static String add(XmlDoc doc, String... args) {
>
> so... you should be able to do something like
> add(doc("id","10"),"update.processor","foo")

Yeah, I am calling that.  I think the problem is that assertU() calls doLegacyUpdate, which doesn't handle getting the chain.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]