Example #1
0
  public void storyTearDown() throws Throwable {
    List<Throwable> errors = new LinkedList<Throwable>();
    try {
      new StopContainerStep(container).runStep();
    } catch (Throwable th) {
      errors.add(th);
    }
    try {
      new DestroyContainerStep(container).runStep();
    } catch (Throwable th) {
      errors.add(th);
    }
    try {
      // System.out.println("Data Service in " + testInfo.getDir());
      Utils.deleteDir(new File(testInfo.getDir()));
    } catch (Throwable th) {
      errors.add(th);
    }

    if (errors.size() != 0) {
      System.err.println("EXCEPTION(S) OCCURED DURING TEAR DOWN:");
      for (Throwable t : errors) {
        System.err.println("----------------");
        t.printStackTrace();
      }
      throw new Exception("EXCEPTION(S) OCCURED DURING TEAR DOWN.  SEE LOGS");
    }
  }
Example #2
0
  public boolean storySetUp() throws Throwable {
    testInfo = SDK44ServiceStyleSystemTestConstants.getTestServiceInfo();
    container = ServiceContainerFactory.createContainer(ServiceContainerType.TOMCAT_CONTAINER);
    File serviceDir = new File(testInfo.getDir());
    serviceDir.mkdirs();

    return container != null && serviceDir.exists() && serviceDir.isDirectory();
  }
Example #3
0
 protected Vector<?> steps() {
   Vector<Step> steps = new Vector<Step>();
   steps.add(new CreateDataServiceStep(testInfo, getIntroduceBaseDir()));
   steps.add(new UnpackContainerStep(container));
   List<String> deploymentArgs =
       Arrays.asList(
           new String[] {
             "-Dno.deployment.validation=true", "-Dperform.index.service.registration=false"
           });
   steps.add(new DeployServiceStep(container, testInfo.getDir(), deploymentArgs));
   steps.add(new StartContainerStep(container));
   steps.add(new InvokeDataServiceStep(testInfo, container));
   steps.add(new InvokeCql2DataServiceStep(testInfo, container));
   return steps;
 }