Make all tests use port 8545 to check connection closing between tests
This commit is contained in:
parent
7a27a78122
commit
5da9ce7881
|
@ -6,11 +6,11 @@
|
|||
import unittest, debugclient, ../json_rpc/rpcserver
|
||||
import strformat, chronicles
|
||||
|
||||
var server = newRpcSocketServer("localhost", 8547.Port)
|
||||
var server = newRpcSocketServer("localhost", Port(8545))
|
||||
var client = newRpcSocketClient()
|
||||
|
||||
server.start()
|
||||
waitFor client.connect("localhost", Port(8547))
|
||||
waitFor client.connect("localhost", Port(8545))
|
||||
|
||||
server.rpc("rpc") do(a: int, b: int):
|
||||
result = %(&"a: {a}, b: {b}")
|
||||
|
|
|
@ -7,7 +7,7 @@ from strutils import rsplit
|
|||
template sourceDir: string = currentSourcePath.rsplit(DirSep, 1)[0]
|
||||
|
||||
var
|
||||
server = newRpcSocketServer("localhost", Port(8546))
|
||||
server = newRpcSocketServer("localhost", Port(8545))
|
||||
client = newRpcSocketClient()
|
||||
|
||||
## Generate Ethereum server RPCs
|
||||
|
@ -49,7 +49,7 @@ proc testSigCalls: Future[seq[string]] =
|
|||
result = all(version, sha3)
|
||||
|
||||
server.start()
|
||||
waitFor client.connect("localhost", Port(8546))
|
||||
waitFor client.connect("localhost", Port(8545))
|
||||
|
||||
|
||||
suite "Local calls":
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import unittest, json, chronicles
|
||||
import ../json_rpc/[rpcclient, rpcserver]
|
||||
|
||||
var srv = newRpcSocketServer(["localhost:8546"])
|
||||
var srv = newRpcSocketServer(["localhost:8545"])
|
||||
var client = newRpcSocketClient()
|
||||
|
||||
# Create RPC on server
|
||||
|
@ -9,7 +9,7 @@ srv.rpc("myProc") do(input: string, data: array[0..3, int]):
|
|||
result = %("Hello " & input & " data: " & $data)
|
||||
|
||||
srv.start()
|
||||
waitFor client.connect("localhost", Port(8546))
|
||||
waitFor client.connect("localhost", Port(8545))
|
||||
|
||||
# TODO: When an error occurs during a test, stop the server
|
||||
suite "Server/Client RPC":
|
||||
|
|
Loading…
Reference in New Issue