Exemplo n.º 1
0
  @Before
  public void setUp() throws Exception {
    super.setUp();

    String peerPubKey = workerAcceptanceUtil.simulateAuthentication();
    peerID =
        new DeploymentID(
            new ContainerID("peerUser", "peerServer", PeerConstants.MODULE_NAME, peerPubKey),
            PeerConstants.WORKER_MANAGEMENT_CLIENT_OBJECT_NAME);
    component = req_004_Util.startWorker(peerID, true);
    workerID = workerAcceptanceUtil.getPeerMonitorDeployment().getDeploymentID();
  }
  @Before
  public void setUp() throws Exception {
    super.setUp();

    peerPubKey = workerAcceptanceUtil.simulateAuthentication();
    peerID =
        new DeploymentID(
            new ContainerID("peerUser", "peerServer", PeerConstants.MODULE_NAME, peerPubKey),
            PeerConstants.WORKER_MANAGEMENT_CLIENT_OBJECT_NAME);

    remotePeerID =
        new DeploymentID(
            new ContainerID(
                "remotePeerUser", "peerServer", PeerConstants.MODULE_NAME, "remotePeerPubKey"),
            PeerConstants.REMOTE_WORKER_MANAGEMENT_CLIENT);

    component = req_003_Util.createWorkerComponent(peerID.getServiceID(), false);
    req_004_Util.startWorker(component);
    req_092_Util.prepareAllocationCompletedOnPreparingWorker(component);
    testStub =
        req_126_Util.notifyPeerRecoveryAtWorkerWithoutPeer(
            component, peerID, workerAcceptanceUtil.getPeerMonitorDeployment().getDeploymentID());
    req_129_Util.loginCompleteIdle(component, peerPubKey, peerID, testStub);
    wmc = workerAcceptanceUtil.createWorkerManagementClient(peerID);

    req_006_Util.workForPeerOnIdleWorkerLoggedPeer(
        component, wmc, peerID.getPublicKey(), remotePeerID.getPublicKey());

    rwmc = workerAcceptanceUtil.createRemoteWorkerManagementClient(remotePeerID.getPublicKey());

    remoteBrokerID =
        new DeploymentID(
            new ContainerID(
                "brokerUserName", "brokerServer", BrokerConstants.MODULE_NAME, "brokerPublicKey"),
            BrokerConstants.WORKER_CLIENT);

    otherRemoteBrokerID =
        new DeploymentID(
            new ContainerID(
                "brokerUserName2", "brokerServer", BrokerConstants.MODULE_NAME, "brokerPublicKey2"),
            BrokerConstants.WORKER_CLIENT);

    req_121_Util.workForBrokerOnAllocatedForPeerWorker(
        component, rwmc, remotePeerID.getPublicKey(), remoteBrokerID.getServiceID());

    req_079_Util.startWorkSuccessfully(component, workerAcceptanceUtil.getWorker(), remoteBrokerID);

    prepFuture =
        req_121_Util.workForBrokerOnWorkingWorkerAndDiffPubKey(
            component, rwmc, remotePeerID.getPublicKey(), otherRemoteBrokerID.getServiceID());
  }
Exemplo n.º 3
0
 @Test
 public void test_302_1_Start() throws Exception {
   req_004_Util.startWorkerAlreadyStarted(component);
 }