コード例 #1
0
def test_zmq_drive_bind_server():

    try:
        # Start reply server:
        reply_server_thread = ReplyServerThread(lambda t: 100)
        reply_server_thread.start()


        # Run test:
        singlepop(basic_steady_state, bgfr=RequestFiringRate(reply_server_thread.port))

    finally:
        import zmq
        socket = zmq_context.socket(zmq.REQ)
        socket.connect("tcp://localhost:%s" % reply_server_thread.port)
        socket.send('SHUTDOWN')
        message = socket.recv()
        assert message == 'DOWN'
        time.sleep(.1)
        assert reply_server_thread.is_alive() == False
コード例 #2
0
ファイル: test_singlepop.py プロジェクト: kaeldai/dipde_dev
def test_zmq_drive_bind_server():

    reply_server_thread = ReplyServerThread(lambda t: 100)
    reply_server_thread.start()
    singlepop(basic_steady_state,
              bgfr=RequestConnection(reply_server_thread.port))
    reply_server_thread.shutdown()
コード例 #3
0
ファイル: test_singlepop.py プロジェクト: kaeldai/dipde_dev
def test_zmq_nsyn():
    reply_server_thread = ReplyServerThread(lambda: 1)
    reply_server_thread.start()
    singlepop(basic_steady_state,
              nsyn=RequestConnection(reply_server_thread.port))
    reply_server_thread.shutdown()
コード例 #4
0
ファイル: test_singlepop.py プロジェクト: nicain/dipde_dev
def test_zmq_drive_bind_server():

    reply_server_thread = ReplyServerThread(lambda t: 100)
    reply_server_thread.start()
    singlepop(basic_steady_state, bgfr=RequestConnection(reply_server_thread.port))
    reply_server_thread.shutdown()
コード例 #5
0
ファイル: test_singlepop.py プロジェクト: nicain/dipde_dev
def test_zmq_nsyn():
    reply_server_thread = ReplyServerThread(lambda: 1)
    reply_server_thread.start()
    singlepop(basic_steady_state, nsyn=RequestConnection(reply_server_thread.port))
    reply_server_thread.shutdown()