[ 
https://issues.apache.org/jira/browse/SOLR-5623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13868323#comment-13868323
 ] 

Hoss Man commented on SOLR-5623:
--------------------------------

bq. How do I make a test that asserts facts about logging?

That's what i was mentioning in the email thread -- i don't know of anyway to 
assert that something is logged, but you can assert that adding a document 
results in an exception being thrown to the client which matches a specified 
expression (which is probably the most important thing in this situation 
anyway) and then that should also result in the exception being logged.

There's probably some way we could setup a MockLogListener or something in the 
test framework, and tell it what to pay attention to and assert that it sees 
those exceptions after the appropriate client calls -- but we don't have 
anything like that and of the top of my head i don't know how to do it.

> Better diagnosis of RuntimeExceptions in analysis
> -------------------------------------------------
>
>                 Key: SOLR-5623
>                 URL: https://issues.apache.org/jira/browse/SOLR-5623
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Benson Margulies
>
> If an analysis component (tokenizer, filter, etc) gets really into a hissy 
> fit and throws a RuntimeException, the resulting log traffic is less than 
> informative, lacking any pointer to the doc under discussion (in the doc 
> case). It would be more better if there was a catch/try shortstop that logged 
> this more informatively.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

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

Reply via email to