aboutsummaryrefslogtreecommitdiffstats
path: root/api/api.go
diff options
context:
space:
mode:
authorOndrej Fabry <ofabry@cisco.com>2018-03-23 14:28:41 +0100
committerOndrej Fabry <ofabry@cisco.com>2018-03-23 14:28:41 +0100
commit40cdb18263ac2624c5a007ef1b0ac7d1b21974bd (patch)
tree2b793bc89d94ab5ebeb43a0bc5f81082583d7c69 /api/api.go
parent454ee4bc97c45298e7979f5e3427f7870a628e74 (diff)
Support mocking reply for more multi requests at once
Change-Id: I3610fe1e0c04f4487f6b7139fc62ef4515fad640 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'api/api.go')
-rw-r--r--api/api.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/api/api.go b/api/api.go
index c247417..98932fa 100644
--- a/api/api.go
+++ b/api/api.go
@@ -233,15 +233,15 @@ func (ch *Channel) receiveReplyInternal(msg Message) (LastReplyReceived bool, er
return false, err
}
if vppReply.MessageID != expMsgID {
- err = fmt.Errorf("invalid message ID %d, expected %d "+
- "(also check if multiple goroutines are not sharing one GoVPP channel)", vppReply.MessageID, expMsgID)
+ err = fmt.Errorf("received invalid message ID, expected %d (%s), but got %d (check if multiple goroutines are not sharing single GoVPP channel)",
+ expMsgID, msg.GetMessageName(), vppReply.MessageID)
return false, err
}
// decode the message
err = ch.MsgDecoder.DecodeMsg(vppReply.Data, msg)
case <-time.After(ch.replyTimeout):
- err = fmt.Errorf("no reply received within the timeout period %ds", ch.replyTimeout/time.Second)
+ err = fmt.Errorf("no reply received within the timeout period %s", ch.replyTimeout)
}
return
}