1 25 package testsuite.simple; 26 27 import com.mysql.jdbc.util.ServerController; 28 29 import testsuite.BaseTestCase; 30 31 38 public class ServerControllerTest extends BaseTestCase { 39 40 private String baseDir; 41 42 48 public ServerControllerTest(String name) { 49 super(name); 50 51 this.baseDir = System 52 .getProperty("com.mysql.jdbc.test.ServerController.basedir"); 53 } 54 55 60 public static void main(String [] args) { 61 junit.textui.TestRunner.run(ServerControllerTest.class); 62 } 63 64 73 public void testServerController() throws Exception { 74 75 if (this.baseDir != null) { 76 System.out.println("Starting server @ " + this.baseDir); 77 78 ServerController controller = new ServerController(this.baseDir); 79 System.out.println(controller.start()); 80 System.out.println("Hit enter to stop server...."); 81 System.in.read(); 82 controller.stop(true); 83 84 } 85 } 86 } 87 | Popular Tags |