summaryrefslogtreecommitdiffhomepage
path: root/server/server_test.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-11-24 14:09:53 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-11-24 14:09:53 +0900
commitdaca3cf3bcb855bab6f138e39fd78d2ee2bf9b22 (patch)
tree761043ee094bca1f775e9b85a32447321e3b6b95 /server/server_test.go
parent38c47609a2eeae67c2c9cc042adea60484c2f481 (diff)
server: fix Watcher InfiniteChannel leak
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/server_test.go')
-rw-r--r--server/server_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/server_test.go b/server/server_test.go
index 46ef4be3..c9f142f1 100644
--- a/server/server_test.go
+++ b/server/server_test.go
@@ -138,4 +138,9 @@ func TestMonitor(test *testing.T) {
assert.Equal(b.PathList[0].GetNlri().String(), "10.0.0.0/24")
assert.Equal(b.PathList[0].IsWithdraw, true)
+ if _, err := t.AddPath("", []*table.Path{table.NewPath(nil, bgp.NewIPAddrPrefix(24, "10.0.0.0"), true, attrs, time.Now(), false)}); err != nil {
+ log.Fatal(err)
+ }
+ //stop the watcher still having an item.
+ w.Stop()
}