You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Dawid Weiss <da...@gmail.com> on 2012/03/18 19:16:21 UTC
Weird solr errors?
This is a build log that failed recently. It isn't any of the usual
offenders -- could I ask for somebody who knows Solr better and can
interpret this?
Namely these are weird:
> Caused by: org.apache.lucene.queryparser.classic.ParseException: Cannot parse '??::??': Encountered " ":" ": "" at line 1, column 2.
and this one:
> 5558 T30 C0 oasc.SolrException.log SEVERE org.apache.solr.common.SolrException: Invalid Number: hello
I was also thinking that it's really hard to tell if some of the
SEVERE logs are a result of expected tested behavior or if they're
something that should is a red warning light. We could implement a
mechanism which would suppress certain logs (by pattern?) from
appearing if they're expected in a test's output?
Dawid
Re: Weird solr errors?
Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
Thanks Ryan,
> For output readability, it would be great to be able to hide the
> output when we *know* it is expected.
Yes, that's what I meant.
> Is that possible? Is there a better way to test for exceptions you
> want to get thrown?
I don't think there is a better way. On the LUCENE-3808 branch the
console output from tests/ suites only gets emitted to the console
when a suite fails (there is a suite level error or any of its tests
fails). Full output is sent to another file so it is always available
for inspection, but the output log from an ant run is much, much
cleaner to look at.
Another way to do it would be to suppress (enable buffering) in the
logging handler and skip part of the logs if the test passes and we
know a code block will be polluting logs with (expected) exception.
I think LUCENE-3808 is a cleaner approach as it doesn't attempt to
clean anything yet provides a sensible alternative on the console...
If it keeps bothering me I'll try to fix it using the approach above.
Dawid
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Weird solr errors?
Posted by Ryan McKinley <ry...@gmail.com>.
See SolrExampleTests#testErrorHandling()
The test sends in stuff that fails badly and makes sure it gets the
right error back.
try {
server.deleteByQuery( "??::??" ); // query syntax error
Assert.fail("should have a number format exception");
}
catch(SolrException ex) {
assertEquals(400, ex.code());
...
}
For output readability, it would be great to be able to hide the
output when we *know* it is expected.
Is that possible? Is there a better way to test for exceptions you
want to get thrown?
ryan
On Sun, Mar 18, 2012 at 11:16 AM, Dawid Weiss <da...@gmail.com> wrote:
> This is a build log that failed recently. It isn't any of the usual
> offenders -- could I ask for somebody who knows Solr better and can
> interpret this?
>
> Namely these are weird:
>
>> Caused by: org.apache.lucene.queryparser.classic.ParseException: Cannot parse '??::??': Encountered " ":" ": "" at line 1, column 2.
>
> and this one:
>
>> 5558 T30 C0 oasc.SolrException.log SEVERE org.apache.solr.common.SolrException: Invalid Number: hello
>
> I was also thinking that it's really hard to tell if some of the
> SEVERE logs are a result of expected tested behavior or if they're
> something that should is a red warning light. We could implement a
> mechanism which would suppress certain logs (by pattern?) from
> appearing if they're expected in a test's output?
>
> Dawid
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org