node: fix test

This commit is contained in:
Felix Lange 2018-10-05 11:22:47 +02:00
parent 0e75052ce2
commit 5adb6d0e89

View file

@ -454,9 +454,9 @@ func TestProtocolGather(t *testing.T) {
Count int Count int
Maker InstrumentingWrapper Maker InstrumentingWrapper
}{ }{
"Zero Protocols": {0, InstrumentedServiceMakerA}, "zero": {0, InstrumentedServiceMakerA},
"Single Protocol": {1, InstrumentedServiceMakerB}, "one": {1, InstrumentedServiceMakerB},
"Many Protocols": {25, InstrumentedServiceMakerC}, "many": {10, InstrumentedServiceMakerC},
} }
for id, config := range services { for id, config := range services {
protocols := make([]p2p.Protocol, config.Count) protocols := make([]p2p.Protocol, config.Count)
@ -480,7 +480,7 @@ func TestProtocolGather(t *testing.T) {
defer stack.Stop() defer stack.Stop()
protocols := stack.Server().Protocols protocols := stack.Server().Protocols
if len(protocols) != 26 { if len(protocols) != 11 {
t.Fatalf("mismatching number of protocols launched: have %d, want %d", len(protocols), 26) t.Fatalf("mismatching number of protocols launched: have %d, want %d", len(protocols), 26)
} }
for id, config := range services { for id, config := range services {