geode-assembly/src/test/java/org/apache/geode/session/tests/TomcatClientServerTest.java
@Before
  public void startServer() throws Exception {
    TomcatInstall install = (TomcatInstall) getInstall();
    // List of all the jars for tomcat to put on the server classpath
    String libDirJars = install.getHome() + "/lib/*";
    String binDirJars = install.getHome() + "/bin/*";

    // Set server name based on the test about to be run
    serverName = getClass().getSimpleName().concat("_").concat(getTestMethodName());

    // Create command string for starting server
    CommandStringBuilder command = new CommandStringBuilder(CliStrings.START_SERVER);
    command.addOption(CliStrings.START_SERVER__NAME, serverName);
    command.addOption(CliStrings.START_SERVER__SERVER_PORT, "0");
    // Add Tomcat jars to server classpath
    command.addOption(CliStrings.START_SERVER__CLASSPATH,
        binDirJars + File.pathSeparator + libDirJars);
    command.addOption(CliStrings.START_SERVER__LOCATORS, DUnitEnv.get().getLocatorString());

    // Start server
    gfsh.executeAndVerifyCommand(command.toString());
  }
/**
   * Starts a server for the client Tomcat container to connect to using the GFSH command line
   * before each test
   */
Starts a server for the client Tomcat container to connect to using the GFSH command line
before each test
Starts a server for the client Tomcat container to connect to using the GFSH command line before each test
@Before
  public void startServer() throws Exception {
    TomcatInstall install = (TomcatInstall) getInstall();
    String libDirJars = install.getHome() + "/lib/*";
    String binDirJars = install.getHome() + "/bin/*";
    serverName = getClass().getSimpleName().concat("_").concat(getTestMethodName());
    CommandStringBuilder command = new CommandStringBuilder(CliStrings.START_SERVER);
    command.addOption(CliStrings.START_SERVER__NAME, serverName);
    command.addOption(CliStrings.START_SERVER__SERVER_PORT, "0");
    command.addOption(CliStrings.START_SERVER__CLASSPATH,
        binDirJars + File.pathSeparator + libDirJars);
    command.addOption(CliStrings.START_SERVER__LOCATORS, DUnitEnv.get().getLocatorString());
    gfsh.executeAndVerifyCommand(command.toString());
  }
@ Before public void startServer ( ) throws Exception { TomcatInstall install = ( TomcatInstall ) getInstall ( ) ; String libDirJars = install . getHome ( ) + "/lib/*" ; String binDirJars = install . getHome ( ) + "/bin/*" ; serverName = getClass ( ) . getSimpleName ( ) . concat ( "_" ) . concat ( getTestMethodName ( ) ) ; CommandStringBuilder command = new CommandStringBuilder ( CliStrings . START_SERVER ) ; command . addOption ( CliStrings . START_SERVER__NAME , serverName ) ; command . addOption ( CliStrings . START_SERVER__SERVER_PORT , "0" ) ; command . addOption ( CliStrings . START_SERVER__CLASSPATH , binDirJars + File . pathSeparator + libDirJars ) ; command . addOption ( CliStrings . START_SERVER__LOCATORS , DUnitEnv . get ( ) . getLocatorString ( ) ) ; gfsh . executeAndVerifyCommand ( command . toString ( ) ) ; }
Starts a server for the client Tomcat container to connect to using the GFSH command line
 before each test
Starts a server for the client Tomcat container to connect to using the GFSH command line before each test
// List of all the jars for tomcat to put on the server classpath // Set server name based on the test about to be run // Create command string for starting server // Add Tomcat jars to server classpath // Start server