aboutsummaryrefslogtreecommitdiffstats
path: root/adapter/mock/mock_adapter.go
diff options
context:
space:
mode:
authorOndrej Fabry <ofabry@cisco.com>2017-11-28 19:53:14 +0100
committerOndrej Fabry <ofabry@cisco.com>2017-11-28 19:53:14 +0100
commit67482a4f8c3a3a7cf17b4edf82e61c28b318ffd9 (patch)
treef08519f399f345439bd3b3cfd4f61c1c63e34889 /adapter/mock/mock_adapter.go
parent3f1edad4e6ba0a7876750aea55507fae14d8badf (diff)
Add WaitReady to VppAdapter
- this fixes issue with mocked adapter during AsyncConnect Change-Id: I952025fec865422f9e83cec9383d96f79a639c90 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'adapter/mock/mock_adapter.go')
-rw-r--r--adapter/mock/mock_adapter.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/adapter/mock/mock_adapter.go b/adapter/mock/mock_adapter.go
index 8c88030..f85f17d 100644
--- a/adapter/mock/mock_adapter.go
+++ b/adapter/mock/mock_adapter.go
@@ -294,6 +294,11 @@ func (a *VppAdapter) SetMsgCallback(cb func(context uint32, msgID uint16, data [
a.callback = cb
}
+// WaitReady mocks waiting for VPP
+func (a *VppAdapter) WaitReady() func() error {
+ return func() error { return nil }
+}
+
// MockReply stores a message to be returned when the next request comes. It is a FIFO queue - multiple replies
// can be pushed into it, the first one will be popped when some request comes.
// Using of this method automatically switches the mock into th useRepliesQueue mode.