1 22 package org.jboss.test; 23 24 import junit.framework.Test; 25 26 41 42 public class JBossTestClusteredSetup extends JBossTestSetup 43 { 44 45 47 49 private String jarName; 50 52 54 public JBossTestClusteredSetup(Test test, String jar) throws Exception 55 { 56 super(JBossClusteredTestCase.class, test); 57 jarName = jar; 58 } 59 60 61 63 65 67 69 71 protected JBossTestServices createTestServices() 72 { 73 return new JBossTestClusteredServices(getClass()); 74 } 75 76 protected void setUp() throws Exception 77 { 78 super.setUp(); 79 80 if (jarName == null) return; 81 JBossTestCase.deploymentException = null; 82 try 83 { 84 this.deploy(jarName); 85 this.getLog().debug("deployed package: " + jarName); 86 } 87 catch (Exception ex) 88 { 89 JBossTestCase.deploymentException = ex; 91 } 92 93 synchronized (this) 95 { 96 wait(2000); 97 } 98 } 99 100 protected void tearDown() throws Exception 101 { 102 try 103 { 104 if (jarName != null) 105 { 106 this.getLog().debug("Attempt undeploy of " + jarName); 107 this.undeploy(jarName); 108 this.getLog().debug("undeployed package: " + jarName); 109 } 110 super.tearDown(); 111 } 112 finally 113 { 114 AbstractTestSetup.delegate = null; 115 } 116 117 } 118 119 120 122 124 } 125 | Popular Tags |