Author: echatellier Date: 2009-11-25 09:43:35 +0100 (Wed, 25 Nov 2009) New Revision: 2705 Modified: trunk/src/test/java/org/chorem/jtimer/ui/system/SystemInfoFactoryTest.java Log: Can't error that can happen when xvfb x server is available Modified: trunk/src/test/java/org/chorem/jtimer/ui/system/SystemInfoFactoryTest.java =================================================================== --- trunk/src/test/java/org/chorem/jtimer/ui/system/SystemInfoFactoryTest.java 2009-11-20 16:30:09 UTC (rev 2704) +++ trunk/src/test/java/org/chorem/jtimer/ui/system/SystemInfoFactoryTest.java 2009-11-25 08:43:35 UTC (rev 2705) @@ -41,7 +41,7 @@ /** log. */ private static Log log = LogFactory.getLog(ReportGeneratorTest.class); - + /** * Test to get system info. * @@ -52,16 +52,20 @@ public void getSystemInfoTest() { try { SystemInfo systemInfo = SystemInfoFactory.getSystemInfo(); - + Assert.assertTrue(systemInfo.getIdleTime() >= 0, "Idle time must be positive"); - } - catch(UnsupportedSystemInfoException e) { - + } catch (UnsupportedSystemInfoException e) { // can happen if (log.isInfoEnabled()) { log.info("No system info available in system, skip test"); } + } catch (UnsatisfiedLinkError e) { + // can happen on system where libX11 is available + // libXss is not (on xvfb x server for example) + if (log.isWarnEnabled()) { + log.warn("Can't initialize native system librairies", e); + } } } }
participants (1)
-
echatellier@users.chorem.org