Alan Davis c9e8436ebf Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
57914: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3)
      57901: Merged V4.1-BUG-FIX (4.1.8) to V4.2-BUG-FIX (4.2.1)
         57891: MNT-9559: Merged DEV to V4.1-BUG-FIX
           56210: MNT-9559: JMX Dump does not report Linux distribution
                  - In JmxDumpUtil class was added updateOSNameAttributeForLinux(String) method;
                  - Was added JmxDumpUtilTest test.
           56250: MNT-9559: JMX Dump does not report Linux distribution
           56340: MNT-9559: JMX Dump does not report Linux distribution


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@61907 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2014-02-11 22:27:32 +00:00

26 lines
832 B
Java

package org.alfresco.repo.management;
import junit.framework.TestCase;
import org.alfresco.repo.security.authentication.AuthenticationComponent;
import org.alfresco.util.ApplicationContextHelper;
import org.springframework.context.ApplicationContext;
public class JmxDumpUtilTest extends TestCase
{
private static ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
private AuthenticationComponent authenticationComponent;
public void testUpdateOSNameAttribute() throws Exception
{
String osName = System.getProperty("os.name");
if (osName.toLowerCase().startsWith("linux"))
{
String attr = JmxDumpUtil.updateOSNameAttributeForLinux(osName);
assertTrue(attr.toLowerCase().startsWith("linux ("));
}
}
}