mirror of https://github.com/apache/lucene.git
SOLR-14099: work around @LogLevel bug in LoggingHandlerTest
This commit is contained in:
parent
dc35e5752b
commit
e6b5da5c12
|
@ -52,10 +52,17 @@ public class LoggingHandlerTest extends SolrTestCaseJ4 {
|
|||
loggerConfig.setLevel(Level.INFO);
|
||||
ctx.updateLoggers();
|
||||
|
||||
// HACK: work around for SOLR-14099...
|
||||
Logger apache = LogManager.getLogger("org.apache");
|
||||
final String apache_level = null == apache.getLevel()
|
||||
? "null[@name='level']"
|
||||
: "str[@name='level'][.='"+apache.getLevel()+"']";
|
||||
|
||||
|
||||
assertQ("Show Log Levels OK",
|
||||
req(CommonParams.QT,"/admin/logging")
|
||||
,"//arr[@name='loggers']/lst/str[.='"+tst.getName()+"']/../str[@name='level'][.='"+tst.getLevel()+"']"
|
||||
,"//arr[@name='loggers']/lst/str[.='org.apache']/../null[@name='level']"
|
||||
,"//arr[@name='loggers']/lst/str[.='org.apache']/../" + apache_level
|
||||
);
|
||||
|
||||
assertQ("Set a level",
|
||||
|
|
Loading…
Reference in New Issue