You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ch...@apache.org on 2017/02/20 10:36:05 UTC
svn commit: r1783736 - in
/sling/trunk/bundles/commons/log-webconsole/src/test:
java/org/apache/sling/commons/log/webconsole/ITWebConsoleRemote.java
resources/test-webconsole-remote.xml
Author: chetanm
Date: Mon Feb 20 10:36:05 2017
New Revision: 1783736
URL: http://svn.apache.org/viewvc?rev=1783736&view=rev
Log:
SLING-6530 - ITWebConsoleRemote fails intermittently
The logback file was not having required custom tags hence the test cannot work and at times passes due to assertions passing due to fails log message entries
Modified:
sling/trunk/bundles/commons/log-webconsole/src/test/java/org/apache/sling/commons/log/webconsole/ITWebConsoleRemote.java
sling/trunk/bundles/commons/log-webconsole/src/test/resources/test-webconsole-remote.xml
Modified: sling/trunk/bundles/commons/log-webconsole/src/test/java/org/apache/sling/commons/log/webconsole/ITWebConsoleRemote.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/log-webconsole/src/test/java/org/apache/sling/commons/log/webconsole/ITWebConsoleRemote.java?rev=1783736&r1=1783735&r2=1783736&view=diff
==============================================================================
--- sling/trunk/bundles/commons/log-webconsole/src/test/java/org/apache/sling/commons/log/webconsole/ITWebConsoleRemote.java (original)
+++ sling/trunk/bundles/commons/log-webconsole/src/test/java/org/apache/sling/commons/log/webconsole/ITWebConsoleRemote.java Mon Feb 20 10:36:05 2017
@@ -110,13 +110,13 @@ public class ITWebConsoleRemote extends
String text = page.asText();
//Filter name should be part of Filter table
- assertTrue(text.contains("WebConsoleTestTurboFilter"));
+ assertThat(text, containsString("WebConsoleTestTurboFilter"));
//Console name should be part of console table
- assertTrue(text.contains("WebConsoleTestAppender"));
+ assertThat(text, containsString("WebConsoleTestAppender"));
//Should show file name testremote.log
- assertTrue(text.contains("testremote.log"));
+ assertThat(text, containsString("testremote.log"));
}
@Test
Modified: sling/trunk/bundles/commons/log-webconsole/src/test/resources/test-webconsole-remote.xml
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/log-webconsole/src/test/resources/test-webconsole-remote.xml?rev=1783736&r1=1783735&r2=1783736&view=diff
==============================================================================
--- sling/trunk/bundles/commons/log-webconsole/src/test/resources/test-webconsole-remote.xml (original)
+++ sling/trunk/bundles/commons/log-webconsole/src/test/resources/test-webconsole-remote.xml Mon Feb 20 10:36:05 2017
@@ -18,6 +18,11 @@
-->
<configuration>
+ <newRule pattern="*/configuration/osgi"
+ actionClass="org.apache.sling.commons.log.logback.OsgiAction"/>
+ <newRule pattern="*/configuration/appender-ref-osgi"
+ actionClass="org.apache.sling.commons.log.logback.OsgiAppenderRefAction"/>
+ <osgi/>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{dd.MM.yyyy HH:mm:ss.SSS} *%level* [%thread] %logger %message%n</pattern>