interop fixes
This commit is contained in:
parent
edc055c1e8
commit
13b623bc81
|
@ -8,8 +8,8 @@
|
|||
## those terms.
|
||||
|
||||
## This module implementes API for `go-libp2p-daemon`.
|
||||
import os, osproc, strutils, tables, strtabs
|
||||
import chronos
|
||||
import std/[os, osproc, strutils, tables, strtabs]
|
||||
import chronos, chronicles
|
||||
import ../varint, ../multiaddress, ../multicodec, ../cid, ../peerid
|
||||
import ../wire, ../multihash, ../protobuf/minprotobuf
|
||||
import ../crypto/crypto
|
||||
|
@ -737,10 +737,12 @@ proc newDaemonApi*(flags: set[P2PDaemonFlags] = {},
|
|||
opt.add $address
|
||||
args.add(opt)
|
||||
args.add("-noise=true")
|
||||
args.add("-quic=false")
|
||||
args.add("-listen=" & $api.address)
|
||||
|
||||
# We are trying to get absolute daemon path.
|
||||
let cmd = findExe(daemon)
|
||||
trace "p2pd cmd", cmd, args
|
||||
if len(cmd) == 0:
|
||||
raise newException(DaemonLocalError, "Could not find daemon executable!")
|
||||
|
||||
|
|
|
@ -18,9 +18,7 @@ randomize()
|
|||
proc generateNodes*(
|
||||
num: Natural,
|
||||
secureManagers: openarray[SecureProtocol] = [
|
||||
# array cos order matters
|
||||
SecureProtocol.Secio,
|
||||
SecureProtocol.Noise,
|
||||
SecureProtocol.Noise
|
||||
],
|
||||
msgIdProvider: MsgIdProvider = nil,
|
||||
gossip: bool = false,
|
||||
|
|
|
@ -141,7 +141,7 @@ proc testPubSubNodePublish(gossip: bool = false,
|
|||
let daemonNode = await newDaemonApi(flags)
|
||||
let daemonPeer = await daemonNode.identity()
|
||||
let nativeNode = newStandardSwitch(
|
||||
secureManagers = [SecureProtocol.Secio],
|
||||
secureManagers = [SecureProtocol.Noise],
|
||||
outTimeout = 5.minutes)
|
||||
|
||||
let pubsub = if gossip:
|
||||
|
@ -206,6 +206,8 @@ suite "Interop":
|
|||
# # echo tracker.dump()
|
||||
# # check tracker.isLeaked() == false
|
||||
|
||||
# TODO: this test is failing sometimes on windows
|
||||
# For some reason we receive EOF before test 4 sometimes
|
||||
test "native -> daemon multiple reads and writes":
|
||||
proc runTests(): Future[bool] {.async.} =
|
||||
var protos = @["/test-stream"]
|
||||
|
@ -267,7 +269,7 @@ suite "Interop":
|
|||
copyMem(addr expect[0], addr buffer.buffer[0], len(expect))
|
||||
|
||||
let nativeNode = newStandardSwitch(
|
||||
secureManagers = [SecureProtocol.Secio],
|
||||
secureManagers = [SecureProtocol.Noise],
|
||||
outTimeout = 5.minutes)
|
||||
|
||||
let awaiters = await nativeNode.start()
|
||||
|
@ -361,7 +363,7 @@ suite "Interop":
|
|||
proto.codec = protos[0] # codec
|
||||
|
||||
let nativeNode = newStandardSwitch(
|
||||
secureManagers = [SecureProtocol.Secio], outTimeout = 5.minutes)
|
||||
secureManagers = [SecureProtocol.Noise], outTimeout = 5.minutes)
|
||||
|
||||
nativeNode.mount(proto)
|
||||
|
||||
|
|
Loading…
Reference in New Issue