/** * Enable trace logging for the given category name. * * @param name - the logging category to enable trace level logging for. */ protected void enableTrace(String name) { getDelegate().enableTrace(name); }
public String[] getServersForURL() throws Exception { String[] servers = getServers() ; String[] result = new String[servers.length]; for (int i=0; i < servers.length; i++) { result[i] = JBossTestUtil.fixHostnameForURL(servers[i]); } return result; }
/** * Returns the JBoss server host from system property "jbosstest.server.host" * in a form suitable for inclusion in URLs (see RFC 2732). * JBAS-8540 */ public String getServerHostForURL() { String hostName = getServerHost() ; return JBossTestUtil.fixHostnameForURL(hostName); } }
/** * Create a delegate by calling AbstractTestDelegate.getDelegate(clazz) * to allow for a test specific delegate. * This method then delegates to the AbstractTestDelegate.setUp method. * @throws Exception */ protected void setUp() throws Exception { super.setUp(); log = getLog(); delegate = (JBossTestServices) AbstractTestSetup.delegate; }
/** * Get the jboss logger. */ public Logger getLog() { return getDelegate().getLog(); }
/** * Gets the InitialContext attribute of the JBossTestCase object * * @return The InitialContext value * @throws Exception for any error */ protected InitialContext getInitialContext() throws Exception { return delegate.getInitialContext(); }
/** * Overriden to return JBossTestServices as the test delegate. * * @param clazz the test class * @return the delegate * @throws Exception for any error */ public static AbstractTestDelegate getDelegate(Class clazz) throws Exception { AbstractTestDelegate delegate = new JBossTestServices(clazz); return delegate; }
/** * Gets the DeployerName attribute of the JBossTestCase object * * @return The DeployerName value * @exception MalformedObjectNameException Description of Exception */ protected ObjectName getDeployerName() throws MalformedObjectNameException { return delegate.getDeployerName(); }
/** * Undeploy a package with the main deployer. The supplied name is * interpreted as a url, or as a filename in jbosstest.deploy.lib or ../lib. * * @param name filename/url of package to undeploy. * @exception Exception Description of Exception */ protected void undeploy(String name) throws Exception { delegate.undeploy(name); }
/** * Assert two float values are equal * * @param one the expected value * @param two the actual value */ protected void assertEquals(float one, float two) { assertEquals(one, two, 0f); }
/** * Overriden to return JBossTestServices as the test delegate. */ public static AbstractTestDelegate getDelegate(Class clazz) throws Exception { AbstractTestDelegate delegate = new JBossTestClusteredServices(clazz); return delegate; }
public String[] getNamingURLs() throws Exception { return clusterServices.getNamingURLs(); } public String[] getHANamingURLs() throws Exception
public String[] getHANamingURLs() throws Exception { return clusterServices.getHANamingURLs(); } public String[] getHttpURLs() throws Exception
/** * Check we have the expected type * * @param <T> the expected type * @param o the object * @param expectedType the excepted class of the exception * @return the expected type */ protected <T> T assertInstanceOf(Object o, Class<T> expectedType) { return assertInstanceOf(o, expectedType, true); }
/** * Get the JBoss server host as above, but in a form suitable for * embedding in URLs - IPv6 literals will be enclosed in square * brackets (see RFC 2732). For JBAS-8540. */ public String getServerHostForURL() { return delegate.getServerHostForURL(); }
/** * Create a delegate by calling AbstractTestDelegate.getDelegate(clazz) * to allow for a test specific delegate. * This method then delegates to the AbstractTestDelegate.setUp method. * @throws Exception */ protected void setUp() throws Exception { super.setUp(); log = getLog(); delegate = (JBossTestServices) AbstractTestSetup.delegate; }
/** * Enable trace logging for the given category name. * * @param name - the logging category to enable trace level logging for. */ protected void enableTrace(String name) { getDelegate().enableTrace(name); }
/** * Get the jboss logger. */ public Logger getLog() { return getDelegate().getLog(); }