Package org.zeromq.ZMQ

Examples of org.zeromq.ZMQ.Context.term()


        assertNotNull("No event was received", event);
        assertEquals(ZMQ.EVENT_DISCONNECTED, event.getEvent());
       
        socket.close();
        monitor.close();
        context.term();
    }
   
    @Test
    public void testEventMonitorStopped() {
        if (ZMQ.version_full() < ZMQ.make_version(4, 0, 0)) // EVENT_MONITOR_STOPPED added in 4.0.0
View Full Code Here


        assertNotNull("No event was received", event);
        assertEquals(ZMQ.EVENT_MONITOR_STOPPED, event.getEvent());
       
        socket.close();
        monitor.close();
        context.term();
    }
}
View Full Code Here

        }
        assertEquals(infos[infos.length - 1].offset(), (long) offsetList.get(infos.length));


        sock.close();
        ctx.term();
    }

    @Test
    public void testFetch() throws Exception
    {
View Full Code Here

        while (it.hasNext()) {
            it.next();
        }

        sock.close();
        ctx.term();
    }

}
View Full Code Here

        assertEquals(dealer.recv()[0], Persistence.STATUS_INTERNAL_ERROR);

        dealer.close();
        router.close();
        ctx.term();
    }

    @Test
    public void testResponse() throws Exception
    {
View Full Code Here

        assertEquals(dealer.recv()[0], STATUS_OK);
        assertEquals(dealer.recv().length, 8);

        dealer.close();
        router.close();
        ctx.term();
    }

    @Test
    public void testFile() throws Exception
    {
View Full Code Here

        assertEquals(false, content.hasRemaining());

        dealer.close();
        router.close();
        ctx.term();
    }
}
View Full Code Here

        zlog.flush();

        assertEquals(zlog.offset(), offset + data.length() + 2);

        sock.close();
        ctx.term();
    }

    @Test
    public void testSendPush() throws Exception
    {
View Full Code Here

        zlog.flush();

        assertEquals(zlog.offset(), offset + data.length() + 2);

        sock.close();
        ctx.term();
    }

}
View Full Code Here

        ZMQ.proxy (clients, workers, null);

        //  We never get here but clean up anyhow
        clients.close();
        workers.close();
        context.term();
    }
}
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.