Package org.hive2hive.core.processes.util

Examples of org.hive2hive.core.processes.util.DenyingMessageReplyHandler


        notifier);
    TestProcessComponentListener listener = new TestProcessComponentListener();
    process.attachListener(listener);

    // kick out peer 3 (B)
    network.get(3).getConnection().getPeer().setObjectDataReply(new DenyingMessageReplyHandler());
    process.start();

    // wait until all messages are sent
    UseCaseTestUtil.waitTillSucceded(listener, 20);
View Full Code Here


        notifier);
    TestProcessComponentListener listener = new TestProcessComponentListener();
    process.attachListener(listener);

    // kick out peer 3 and 4 (B)
    network.get(3).getConnection().getPeer().setObjectDataReply(new DenyingMessageReplyHandler());
    network.get(4).getConnection().getPeer().setObjectDataReply(new DenyingMessageReplyHandler());
    process.start();

    // wait until all messages are sent
    UseCaseTestUtil.waitTillSucceded(listener, 20);
View Full Code Here

        notifier);
    TestProcessComponentListener listener = new TestProcessComponentListener();
    process.attachListener(listener);

    // kick out Peer 1
    network.get(1).getConnection().getPeer().setObjectDataReply(new DenyingMessageReplyHandler());
    process.start();

    // wait until all messages are sent
    UseCaseTestUtil.waitTillSucceded(listener, 20);
View Full Code Here

    downloader = network.get(2);

    userCredentials = NetworkTestUtil.generateRandomCredentials();

    // make the two clients ignore each other
    uploader.getConnection().getPeer().setObjectDataReply(new DenyingMessageReplyHandler());
    downloader.getConnection().getPeer().setObjectDataReply(new DenyingMessageReplyHandler());

    // create the roots and the file manager
    File rootUploader = new File(System.getProperty("java.io.tmpdir"), NetworkTestUtil.randomString());
    uploaderRoot = rootUploader.toPath();
    File rootDownloader = new File(System.getProperty("java.io.tmpdir"), NetworkTestUtil.randomString());
View Full Code Here

    downloaderRoot = new File(FileUtils.getTempDirectory(), NetworkTestUtil.randomString());
    UseCaseTestUtil.login(userCredentials, downloader, downloaderRoot);

    // workaround that the downloader does not get notified about the newly added file (it will be done
    // manually)
    downloader.getConnection().getPeer().setObjectDataReply(new DenyingMessageReplyHandler());

    // upload a file
    String fileName = NetworkTestUtil.randomString();
    uploadedFile = FileTestUtil.createFileRandomContent(fileName, 10, uploaderRoot, CHUNK_SIZE);
    testContent = FileUtils.readFileToString(uploadedFile); // store for later tests
View Full Code Here

TOP

Related Classes of org.hive2hive.core.processes.util.DenyingMessageReplyHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.