From c1b2d45d1b562df1af29012e58f33ff8bff597ac Mon Sep 17 00:00:00 2001 From: Tanguy Cizain Date: Tue, 13 Jul 2021 13:53:08 +0200 Subject: [PATCH] Track ChronosStream in test (#605) * track chronos stream in tests * use chronosstreamtrackername --- libp2p/stream/chronosstream.nim | 2 +- tests/helpers.nim | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libp2p/stream/chronosstream.nim b/libp2p/stream/chronosstream.nim index c5da52f..c625d50 100644 --- a/libp2p/stream/chronosstream.nim +++ b/libp2p/stream/chronosstream.nim @@ -45,7 +45,7 @@ chronicles.formatIt(ChronosStream): shortLog(it) method initStream*(s: ChronosStream) = if s.objName.len == 0: - s.objName = "ChronosStream" + s.objName = ChronosStreamTrackerName s.timeoutHandler = proc() {.async, gcsafe.} = trace "Idle timeout expired, closing ChronosStream", s diff --git a/tests/helpers.nim b/tests/helpers.nim index 4cda099..548b15a 100644 --- a/tests/helpers.nim +++ b/tests/helpers.nim @@ -6,6 +6,7 @@ import ../libp2p/transports/tcptransport import ../libp2p/stream/bufferstream import ../libp2p/crypto/crypto import ../libp2p/stream/lpstream +import ../libp2p/stream/chronosstream import ../libp2p/muxers/mplex/lpchannel import ../libp2p/protocols/secure/secure @@ -24,6 +25,7 @@ const BufferStreamTrackerName, TcpTransportTrackerName, StreamTransportTrackerName, + ChronosStreamTrackerName, StreamServerTrackerName ]