From 491b9129f62b78c7766759c6945cd76ba875feeb Mon Sep 17 00:00:00 2001 From: Raycho Mukelov Date: Tue, 12 Sep 2023 12:50:40 +0300 Subject: [PATCH] fix --- tests/raft_test_node_standalone.nim | 6 ++++-- tests/tornado_simple_raft_node_server.py | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/raft_test_node_standalone.nim b/tests/raft_test_node_standalone.nim index e1f6371..f06c73f 100644 --- a/tests/raft_test_node_standalone.nim +++ b/tests/raft_test_node_standalone.nim @@ -37,18 +37,20 @@ proc TestRaftMessageSendCallbackCreate(): RaftMessageSendCallback = host = c.host port = c.port var - client = newAsyncHttpClient() + client = newHttpClient() s = MsgStream.init() # besides MsgStream, you can also use Nim StringStream or FileStream s.pack(msg) #here the magic happened var - resp = await client.post(fmt"http://host:port", s.data) + resp = client.post(fmt"http://{host}:{port}", s.data) echo resp.status + var ss = MsgStream.init(resp.body) xx: RaftMessageResponseBase + ss.unpack(xx) #and here too result = xx diff --git a/tests/tornado_simple_raft_node_server.py b/tests/tornado_simple_raft_node_server.py index c0c9e8f..ef45bfb 100644 --- a/tests/tornado_simple_raft_node_server.py +++ b/tests/tornado_simple_raft_node_server.py @@ -48,6 +48,8 @@ async def main(): if __name__ == "__main__": try: + readFIFO = readFIFO + sys.argv[1] + writeFIFO = writeFIFO + sys.argv[1] os.mkfifo(readFIFO) os.mkfifo(writeFIFO) except OSError as oe: