Examples of TestingHttpClient


Examples of com.proofpoint.http.client.testing.TestingHttpClient

        collectedData = HashBasedTable.create();
        collectedData.put(ObjectName.getInstance("com.example:name=Foo"), "Size", 1.1);
        collectedData.put(ObjectName.getInstance("com.example:type=Foo,name=\"ba:r\",tag1=\"B\\\\a\\\"z\""), "Size", 1.2);

        httpClient = new TestingHttpClient(new TestingResponseFunction());
        sentJson = null;
    }
View Full Code Here

Examples of com.proofpoint.http.client.testing.TestingHttpClient

    }

    @Test
    public void testReportingDisabled()
    {
        httpClient = new TestingHttpClient(new Function<Request, Response>()
        {
            @Override
            public Response apply(Request input)
            {
                throw new UnsupportedOperationException();
View Full Code Here

Examples of com.proofpoint.http.client.testing.TestingHttpClient

    @BeforeMethod
    public void setup()
    {
        processor = mock(Processor.class);
        client = new HttpDiscoveryAnnouncementClient(nodeInfo, jsonCodec(Announcement.class), new TestingHttpClient(processor));
        announcements = ImmutableSet.of(
                serviceAnnouncement("foo").addProperty("bar", "baz").build(),
                serviceAnnouncement("quux").addProperty("a", "b").build()
        );
    }
View Full Code Here

Examples of io.airlift.http.client.testing.TestingHttpClient

    public void setUp()
            throws Exception
    {
        executor = newScheduledThreadPool(4, daemonThreadsNamed("test-%s"));

        httpClient = new TestingHttpClient(new HttpClientHandler(taskBuffers), executor);

        exchangeClientSupplier = new Supplier<ExchangeClient>()
        {
            @Override
            public ExchangeClient get()
View Full Code Here

Examples of io.airlift.http.client.testing.TestingHttpClient

        CyclicBarrier requestComplete = new CyclicBarrier(2);

        TestingClientCallback callback = new TestingClientCallback(requestComplete);

        URI location = URI.create("http://localhost:8080");
        HttpPageBufferClient client = new HttpPageBufferClient(new TestingHttpClient(processor, executor),
                expectedMaxSize,
                new Duration(1, TimeUnit.MINUTES),
                location,
                callback,
                createTestingBlockEncodingManager(),
View Full Code Here

Examples of io.airlift.http.client.testing.TestingHttpClient

        CyclicBarrier requestComplete = new CyclicBarrier(2);
        TestingClientCallback callback = new TestingClientCallback(requestComplete);

        URI location = URI.create("http://localhost:8080");
        HttpPageBufferClient client = new HttpPageBufferClient(new TestingHttpClient(processor, executor),
                new DataSize(10, Unit.MEGABYTE),
                new Duration(1, TimeUnit.MINUTES),
                location,
                callback,
                createTestingBlockEncodingManager(),
View Full Code Here

Examples of io.airlift.http.client.testing.TestingHttpClient

        CyclicBarrier requestComplete = new CyclicBarrier(2);
        TestingClientCallback callback = new TestingClientCallback(requestComplete);

        URI location = URI.create("http://localhost:8080");
        HttpPageBufferClient client = new HttpPageBufferClient(new TestingHttpClient(processor, executor),
                new DataSize(10, Unit.MEGABYTE),
                new Duration(1, TimeUnit.MINUTES),
                location,
                callback,
                createTestingBlockEncodingManager(),
View Full Code Here

Examples of io.airlift.http.client.testing.TestingHttpClient

        CyclicBarrier requestComplete = new CyclicBarrier(2);
        TestingClientCallback callback = new TestingClientCallback(requestComplete);

        URI location = URI.create("http://localhost:8080");
        HttpPageBufferClient client = new HttpPageBufferClient(new TestingHttpClient(processor, executor),
                new DataSize(10, Unit.MEGABYTE),
                new Duration(1, TimeUnit.MINUTES),
                location,
                callback,
                createTestingBlockEncodingManager(),
View Full Code Here

Examples of io.airlift.http.client.testing.TestingHttpClient

        CyclicBarrier requestComplete = new CyclicBarrier(2);
        TestingClientCallback callback = new TestingClientCallback(requestComplete);

        URI location = URI.create("http://localhost:8080");
        HttpPageBufferClient client = new HttpPageBufferClient(new TestingHttpClient(processor, executor),
                new DataSize(10, Unit.MEGABYTE),
                new Duration(1, TimeUnit.MINUTES),
                location,
                callback,
                createTestingBlockEncodingManager(),
View Full Code Here

Examples of io.airlift.http.client.testing.TestingHttpClient

        ExchangeClient exchangeClient = new ExchangeClient(createTestingBlockEncodingManager(),
                new DataSize(32, Unit.MEGABYTE),
                maxResponseSize,
                1,
                new Duration(1, TimeUnit.MINUTES),
                new TestingHttpClient(processor, executor),
                executor);

        exchangeClient.addLocation(location);
        exchangeClient.noMoreLocations();
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.