Package org.jboss.test

Examples of org.jboss.test.JBossTestClusteredServices


{

   public static AbstractTestDelegate getDelegate(Class<?> clazz)
       throws Exception
   {
       return new JBossTestClusteredServices(clazz);
   }
View Full Code Here


{

   public static AbstractTestDelegate getDelegate(Class clazz)
       throws Exception
   {
       return new JBossTestClusteredServices(clazz);
   }
View Full Code Here

            new FailoverSessionWithOneTransactedNonPersistentMessageFailover(latchFailover, latchServerAlreadyKilled)};
    }

    public void doTest() throws Exception
    {
        JBossTestClusteredServices testServices = new JBossTestClusteredServices(ClusteredTestCase.class);
        testServices.setUp();
       
       
       
        MBeanServerConnection rmi = testServices.getAdaptor(1);
       
        ObjectName name = new ObjectName("test:name=JBMKillService");
        if (testServices.getServerCount() != 2)
        {
            throw new Exception ("This test requires 2 servers but it got with " + testServices.getServerCount());
        }
       
        latchCluster.await();
       
        log.info("Clustered tests have finished");
View Full Code Here

           protected void tearDown() throws Exception
           {
             
              if (jarNames != null)
              {
                 JBossTestClusteredServices clusteredDelegate = (JBossTestClusteredServices) delegate;
                
                 // deploy the comma seperated list of jars
                 StringTokenizer st = new StringTokenizer(jarNames, ", ");
                 String[] depoyments = new String[st.countTokens()];
                 for (int i = depoyments.length - 1; i >= 0; i--)
                    depoyments[i] = st.nextToken();
                 for (int i = 0; i < depoyments.length; i++)
                 {
                    String jarName = depoyments[i];
                    this.getLog().debug("Attempt undeploy of " + jarName);
                    clusteredDelegate.undeploy(clusteredDelegate.getAdaptor(0), jarName);
                    this.getLog().debug("undeployed package: " + jarName);
                 }           
              }
             
              JBossTestClusteredServices testServices = (JBossTestClusteredServices) delegate;
              try
              {
                 testServices.getAdaptor(1).invoke(new ObjectName("jboss.system:type=Server"), "shutdown", new Object[]{}, new String[]{});
                 log.info("Shut down jbm-cluster2");
              }
              catch (Exception ignored)
              {
                 // expected if the test worked and shut down a server
View Full Code Here

TOP

Related Classes of org.jboss.test.JBossTestClusteredServices

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.