Package com.facebook.nifty.test

Examples of com.facebook.nifty.test.LogEntry


        socket.setTimeout(1000);
        TBinaryProtocol protocol = new TBinaryProtocol(socket);

        scribe.Client client = new scribe.Client(protocol);

        LogEntry entry = new LogEntry("TestLog", "Test message from plain unframed client");
        client.Log(Arrays.asList(entry));

        socket.close();
    }
View Full Code Here


        TFramedTransport framedTransport = new TFramedTransport(socket);
        TBinaryProtocol protocol = new TBinaryProtocol(framedTransport);

        scribe.Client client = new scribe.Client(protocol);

        LogEntry entry = new LogEntry("TestLog", "Test message from plain framed client");
        client.Log(Arrays.asList(entry));

        socket.close();
    }
View Full Code Here

    public void testMethodCalls()
            throws Exception
    {
        startServer();
        scribe.Client client = makeClient();
        client.Log(Arrays.asList(new LogEntry("hello", "world")));
    }
View Full Code Here

    {
        startServer();
        scribe.Client client = makeNiftyClient();
        int max = (int) (Math.random() * 100);
        for (int i = 0; i < max; i++) {
            client.Log(Arrays.asList(new LogEntry("hello", "world " + i)));
        }
    }
View Full Code Here

            throws InterruptedException, TException
    {
        startServer(getThriftServerDefBuilder());
        scribe.Client client = makeNiftyClient();
        Thread.sleep(500);
        client.Log(Arrays.asList(new LogEntry("hello", "world")));
    }
View Full Code Here

            throws InterruptedException, TException
    {
        startServer(getThriftServerDefBuilder().clientIdleTimeout(new Duration(250, TimeUnit.MILLISECONDS)));
        scribe.Client client = makeNiftyClient();
        Thread.sleep(500);
        client.Log(Arrays.asList(new LogEntry("hello", "world")));
    }
View Full Code Here

        scribe.Client client1 = makeClient();
        scribe.Client client2 = makeClient();
        scribe.Client client3 = makeClient();

        List<LogEntry> messages = ImmutableList.of(new LogEntry("hello", "world"));

        client1.send_Log(messages);
        Uninterruptibles.sleepUninterruptibly(50, TimeUnit.MILLISECONDS);
        client2.send_Log(messages);
        Uninterruptibles.sleepUninterruptibly(50, TimeUnit.MILLISECONDS);
View Full Code Here

                .withProcessor(slowProcessor)
        );

        scribe.Client client1 = makeClient();
        scribe.Client client2 = makeClient();
        List<LogEntry> messages = ImmutableList.of(new LogEntry("hello", "world"));
        client1.send_Log(messages);
        Uninterruptibles.sleepUninterruptibly(50, TimeUnit.MILLISECONDS);
        client2.send_Log(messages);

        try {
View Full Code Here

TOP

Related Classes of com.facebook.nifty.test.LogEntry

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.