Search in sources :

Example 11 with NetworkFacade

use of io.questdb.network.NetworkFacade in project questdb by bluestreak01.

the class LinuxLineUdpProtoReceiverTest method assertCannotBindSocket.

private void assertCannotBindSocket(ReceiverFactory factory) throws Exception {
    TestUtils.assertMemoryLeak(() -> {
        NetworkFacade nf = new NetworkFacadeImpl() {

            @Override
            public boolean bindUdp(long fd, int ipv4Address, int port) {
                return false;
            }
        };
        LineUdpReceiverConfiguration receiverCfg = new DefaultLineUdpReceiverConfiguration() {

            @Override
            public NetworkFacade getNetworkFacade() {
                return nf;
            }
        };
        assertConstructorFail(receiverCfg, factory);
    });
}
Also used : NetworkFacade(io.questdb.network.NetworkFacade) NetworkFacadeImpl(io.questdb.network.NetworkFacadeImpl)

Example 12 with NetworkFacade

use of io.questdb.network.NetworkFacade in project questdb by bluestreak01.

the class LinuxLineUdpProtoReceiverTest method assertCannotJoin.

private void assertCannotJoin(ReceiverFactory factory) throws Exception {
    TestUtils.assertMemoryLeak(() -> {
        NetworkFacade nf = new NetworkFacadeImpl() {

            @Override
            public boolean join(long fd, int bindIPv4Address, int groupIPv4Address) {
                return false;
            }
        };
        LineUdpReceiverConfiguration receiverCfg = new DefaultLineUdpReceiverConfiguration() {

            @Override
            public NetworkFacade getNetworkFacade() {
                return nf;
            }
        };
        assertConstructorFail(receiverCfg, factory);
    });
}
Also used : NetworkFacade(io.questdb.network.NetworkFacade) NetworkFacadeImpl(io.questdb.network.NetworkFacadeImpl)

Aggregations

NetworkFacade (io.questdb.network.NetworkFacade)12 NetworkFacadeImpl (io.questdb.network.NetworkFacadeImpl)7 StaticContentProcessor (io.questdb.cutlass.http.processors.StaticContentProcessor)6 WorkerPool (io.questdb.mp.WorkerPool)6 WorkerPoolConfiguration (io.questdb.mp.WorkerPoolConfiguration)6 JsonQueryProcessor (io.questdb.cutlass.http.processors.JsonQueryProcessor)5 SOCountDownLatch (io.questdb.mp.SOCountDownLatch)3 InputStream (java.io.InputStream)3 TextImportProcessor (io.questdb.cutlass.http.processors.TextImportProcessor)2 DefaultIODispatcherConfiguration (io.questdb.network.DefaultIODispatcherConfiguration)2 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)2 Metrics (io.questdb.Metrics)1 io.questdb.cairo (io.questdb.cairo)1 AllowAllCairoSecurityContext (io.questdb.cairo.security.AllowAllCairoSecurityContext)1 NetUtils (io.questdb.cutlass.NetUtils)1 HealthCheckProcessor (io.questdb.cutlass.http.processors.HealthCheckProcessor)1 QueryCache (io.questdb.cutlass.http.processors.QueryCache)1 SqlCompiler (io.questdb.griffin.SqlCompiler)1 SqlException (io.questdb.griffin.SqlException)1 SqlExecutionContext (io.questdb.griffin.SqlExecutionContext)1