summaryrefslogtreecommitdiffhomepage
path: root/server/fsm_test.go
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-01-23 13:53:41 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-01-25 04:57:11 -0800
commit3817b82f9d57ce02adb025f5acff6f06b54c6641 (patch)
tree1fdb7a47d07cf7601b8688edcae7a61230d2f4cd /server/fsm_test.go
parent38bd31856b5eff046a4874e83b53cb7d3e45cdaf (diff)
fsm: add type FsmStateReason to track reason of state transition
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/fsm_test.go')
-rw-r--r--server/fsm_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/fsm_test.go b/server/fsm_test.go
index 4eb907f3..5fa94641 100644
--- a/server/fsm_test.go
+++ b/server/fsm_test.go
@@ -170,7 +170,7 @@ func TestFSMHandlerOpensent_HoldTimerExpired(t *testing.T) {
// set holdtime
p.fsm.opensentHoldTime = 2
- state := h.opensent()
+ state, _ := h.opensent()
assert.Equal(bgp.BGP_FSM_IDLE, state)
lastMsg := m.sendBuf[len(m.sendBuf)-1]
@@ -194,7 +194,7 @@ func TestFSMHandlerOpenconfirm_HoldTimerExpired(t *testing.T) {
// set holdtime
p.fsm.negotiatedHoldTime = 2
- state := h.openconfirm()
+ state, _ := h.openconfirm()
assert.Equal(bgp.BGP_FSM_IDLE, state)
lastMsg := m.sendBuf[len(m.sendBuf)-1]
@@ -231,7 +231,7 @@ func TestFSMHandlerEstablish_HoldTimerExpired(t *testing.T) {
p.fsm.negotiatedHoldTime = 2
go pushPackets()
- state := h.established()
+ state, _ := h.established()
time.Sleep(time.Second * 1)
assert.Equal(bgp.BGP_FSM_IDLE, state)
lastMsg := m.sendBuf[len(m.sendBuf)-1]
@@ -300,7 +300,7 @@ func makePeerAndHandler() (*Peer, *FSMHandler) {
h := &FSMHandler{
fsm: p.fsm,
- errorCh: make(chan bool, 2),
+ errorCh: make(chan FsmStateReason, 2),
incoming: incoming,
outgoing: p.outgoing,
}