Package com.lmax.ant.paralleljunit.util.net

Examples of com.lmax.ant.paralleljunit.util.net.SocketConnection


    public RemoteTestRunnerController create(final int workerId, final ParallelJUnitTaskConfig config)
    {
        final ServerSocket serverSocket = createServerSocket();
        final Future<SocketConnection> connectionFuture = executorService.submit(connectionEstablisherFactory.create(serverSocket));
        final ManagedProcess jvmProcess = managedProcessFactory.create(workerId, config, serverSocket.getLocalPort());
        final SocketConnection socketConnection = waitForSocketConnection(connectionFuture);
        return new RemoteTestRunnerController(jvmProcess, socketConnection, testSpecificationFactory);
    }
View Full Code Here


    private void executeTests()
    {
        try
        {
            final SocketConnection socketConnection = connectionFactory.createSocketConnection(paramsRemote.getServerPort());

            final Collection<?> formatters = getTestRunnerFormatters();

            RemoteTestRunnerCommand command = null;
            while ((command = socketConnection.readObject()) != null)
            {
                switch (command)
                {
                    case EXIT:
                        socketConnection.close();
                        System.exit(0);
                        break;
                    case RUN_TEST:
                        formatters.clear();
                        socketConnection.writeObject(runTest(socketConnection.<TestSpecification>readObject(), paramsRemote));
                        break;
                    default:
                        throw new RuntimeException("All hell broke loose");
                }
            }
View Full Code Here

TOP

Related Classes of com.lmax.ant.paralleljunit.util.net.SocketConnection

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.