提交 289f2420 作者: Juan Batiz-Benet

p2p/test/reconnects: faster tests

上级 334f9d21
...@@ -111,7 +111,7 @@ func TestReconnect2(t *testing.T) { ...@@ -111,7 +111,7 @@ func TestReconnect2(t *testing.T) {
h1.SetStreamHandler(protocol.TestingID, EchoStreamHandler) h1.SetStreamHandler(protocol.TestingID, EchoStreamHandler)
h2.SetStreamHandler(protocol.TestingID, EchoStreamHandler) h2.SetStreamHandler(protocol.TestingID, EchoStreamHandler)
rounds := 10 rounds := 8
if testing.Short() { if testing.Short() {
rounds = 4 rounds = 4
} }
...@@ -137,9 +137,9 @@ func TestReconnect5(t *testing.T) { ...@@ -137,9 +137,9 @@ func TestReconnect5(t *testing.T) {
h4.SetStreamHandler(protocol.TestingID, EchoStreamHandler) h4.SetStreamHandler(protocol.TestingID, EchoStreamHandler)
h5.SetStreamHandler(protocol.TestingID, EchoStreamHandler) h5.SetStreamHandler(protocol.TestingID, EchoStreamHandler)
rounds := 10 rounds := 4
if testing.Short() { if testing.Short() {
rounds = 4 rounds = 2
} }
for i := 0; i < rounds; i++ { for i := 0; i < rounds; i++ {
log.Debugf("TestReconnect: %d/%d\n", i, rounds) log.Debugf("TestReconnect: %d/%d\n", i, rounds)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论