Package com.netflix.suro.client

Examples of com.netflix.suro.client.SuroClient.shutdown()


                Thread.sleep(1000);
                --count;
            }

            assertTrue(answer());
            client.shutdown();
           
        } catch (Exception e) {
            System.err.println("SuroServer startup failed: " + e.getMessage());
            System.exit(-1);
        }
View Full Code Here


        // send the message
        for (int i = 0; i < Integer.parseInt(args[2]); ++i) {
            client.send(new Message("routingKey", "testMessage".getBytes()));
        }

        client.shutdown();
    }
}
View Full Code Here

            for (int i = 0; i < numMessages; ++i) {
                client.send(new Message(i % 2 == 0 ? "request_trace" : "nf_errors_log", payload));
            }
            Thread.sleep(sleep);
        }
        client.shutdown();
    }

    public static byte[] createMessagePayload(int length) throws JsonProcessingException {
        Map<String, Object> map = new HashMap<String, Object>();
        int currentLength = 0;
View Full Code Here

        TestMessageRouter.TestMessageRouterSink testSink = (TestMessageRouter.TestMessageRouterSink)
                suroServer.getInjector().getInstance(SinkManager.class).getSink("default");
        assertEquals(testSink.getMessageList().size(), 1);
        assertEquals(testSink.getMessageList().get(0), "testMessage");

        client.shutdown();
    }

    @Test
    public void testAsyncClient() throws InterruptedException {
        // create the client
View Full Code Here

                ++count;
            }
        }
        assertEquals(count, 3);

        client.shutdown();
        run.set(false);
        t.join();

        // resuming the traffic
        hasEnoughSpace = true;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.