X-Git-Url: https://gerrit.fd.io/r/gitweb?p=govpp.git;a=blobdiff_plain;f=core%2Fconnection_test.go;h=843c5ea2026674b3613f17b2ff92420524f38843;hp=2ecdd3420ca93f0886fb003a8de61941d994ab77;hb=6fe52d72255456e7d73df9d2f6b4a8f724ed447d;hpb=56e997fc27c775790fcce5eda92bb2baee82d881 diff --git a/core/connection_test.go b/core/connection_test.go index 2ecdd34..843c5ea 100644 --- a/core/connection_test.go +++ b/core/connection_test.go @@ -22,7 +22,6 @@ import ( "git.fd.io/govpp.git/codec" "git.fd.io/govpp.git/core" "git.fd.io/govpp.git/examples/bin_api/interfaces" - "git.fd.io/govpp.git/examples/bin_api/stats" "git.fd.io/govpp.git/examples/bin_api/vpe" . "github.com/onsi/gomega" ) @@ -74,22 +73,12 @@ func TestNilConnection(t *testing.T) { Expect(err.Error()).To(ContainSubstring("nil")) } -func TestDoubleConnection(t *testing.T) { - ctx := setupTest(t, false) - defer ctx.teardownTest() - - conn, err := core.Connect(ctx.mockVpp) - Expect(err).Should(HaveOccurred()) - Expect(err.Error()).To(ContainSubstring("only one connection per process")) - Expect(conn).Should(BeNil()) -} - func TestAsyncConnection(t *testing.T) { ctx := setupTest(t, false) defer ctx.teardownTest() ctx.conn.Disconnect() - conn, statusChan, err := core.AsyncConnect(ctx.mockVpp) + conn, statusChan, err := core.AsyncConnect(ctx.mockVpp, core.DefaultMaxReconnectAttempts, core.DefaultReconnectInterval) ctx.conn = conn Expect(err).ShouldNot(HaveOccurred()) @@ -123,16 +112,6 @@ func TestCodec(t *testing.T) { err = msgCodec.DecodeMsg(data, msg2) Expect(err).ShouldNot(HaveOccurred()) Expect(msg2.Retval).To(BeEquivalentTo(55)) - - // other - data, err = msgCodec.EncodeMsg(&stats.VnetIP4FibCounters{VrfID: 77}, 33) - Expect(err).ShouldNot(HaveOccurred()) - Expect(data).ShouldNot(BeEmpty()) - - msg3 := &stats.VnetIP4FibCounters{} - err = msgCodec.DecodeMsg(data, msg3) - Expect(err).ShouldNot(HaveOccurred()) - Expect(msg3.VrfID).To(BeEquivalentTo(77)) } func TestCodecNegative(t *testing.T) {