Exemplo n.º 1
0
  /** Prepares things for the entire test class. */
  @BeforeClass
  public void beforeClass() throws Exception {
    digestGenerator = new MessageDigestGenerator(MessageDigestGenerator.SHA_256);
    jpaDriftServer = LookupUtil.getJPADriftServer();
    driftManager = LookupUtil.getDriftManager();
    overlord = LookupUtil.getSubjectManager().getOverlord();

    driftServerService = new DriftServerServiceImpl();

    TestServerCommunicationsService agentServiceContainer = prepareForTestAgents();
    agentServiceContainer.driftService = new TestDefService();
  }
Exemplo n.º 2
0
  @Override
  protected void beforeMethod() throws Exception {
    digestGenerator = new MessageDigestGenerator(MessageDigestGenerator.SHA_256);
    jpaDriftServer = LookupUtil.getJPADriftServer();
    driftManager = LookupUtil.getDriftManager();
    overlord = LookupUtil.getSubjectManager().getOverlord();

    driftServerService = new DriftServerServiceImpl();

    TestServerCommunicationsService agentServiceContainer = prepareForTestAgents();
    agentServiceContainer.driftService = new TestDefService();

    prepareScheduler();

    DriftServerPluginService driftServerPluginService = new DriftServerPluginService(getTempDir());
    prepareCustomServerPluginService(driftServerPluginService);
    driftServerPluginService.masterConfig.getPluginDirectory().mkdirs();

    deleteDriftFiles();

    newResource = createNewResource();
  }