From 9c0ec49990e7b83e59c34365dfaa0500da6acc52 Mon Sep 17 00:00:00 2001 From: idanshal Date: Thu, 20 Feb 2020 10:29:42 +0200 Subject: [PATCH] Enable KA requests logging Change-Id: Iff676aba737712484942b593a03d19b113b06ffa Signed-off-by: idanshal --- E2Manager/container-tag.yaml | 2 +- E2Manager/managers/e2t_keep_alive_worker.go | 2 +- E2Manager/managers/e2t_keep_alive_worker_test.go | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/E2Manager/container-tag.yaml b/E2Manager/container-tag.yaml index 8202cd0..a789c9f 100644 --- a/E2Manager/container-tag.yaml +++ b/E2Manager/container-tag.yaml @@ -1,4 +1,4 @@ # The Jenkins job requires a tag to build the Docker image. # Global-JJB script assumes this file is in the repo root. --- -tag: 3.0.5.1 +tag: 3.0.5.2 diff --git a/E2Manager/managers/e2t_keep_alive_worker.go b/E2Manager/managers/e2t_keep_alive_worker.go index 100dbb9..a9c9f2f 100644 --- a/E2Manager/managers/e2t_keep_alive_worker.go +++ b/E2Manager/managers/e2t_keep_alive_worker.go @@ -85,5 +85,5 @@ func (h E2TKeepAliveWorker) E2TKeepAliveExpired() { func (h E2TKeepAliveWorker) SendKeepAliveRequest() { request := models.RmrMessage{MsgType: rmrCgo.E2_TERM_KEEP_ALIVE_REQ} - h.rmrSender.SendWithoutLogs(&request) + h.rmrSender.Send(&request) } \ No newline at end of file diff --git a/E2Manager/managers/e2t_keep_alive_worker_test.go b/E2Manager/managers/e2t_keep_alive_worker_test.go index 0100f28..d6a2fb0 100644 --- a/E2Manager/managers/e2t_keep_alive_worker_test.go +++ b/E2Manager/managers/e2t_keep_alive_worker_test.go @@ -59,14 +59,14 @@ func initE2TKeepAliveTest(t *testing.T) (*mocks.RmrMessengerMock, *mocks.RnibRea func TestSendKeepAliveRequest(t *testing.T) { rmrMessengerMock, _, _, _, e2tKeepAliveWorker := initE2TKeepAliveTest(t) - rmrMessengerMock.On("SendMsg", mock.Anything, false).Return(&rmrCgo.MBuf{}, nil) + rmrMessengerMock.On("SendMsg", mock.Anything, true).Return(&rmrCgo.MBuf{}, nil) e2tKeepAliveWorker.SendKeepAliveRequest() var payload, xAction []byte req := rmrCgo.NewMBuf(rmrCgo.E2_TERM_KEEP_ALIVE_REQ, 0, "", &payload, &xAction) - rmrMessengerMock.AssertCalled(t, "SendMsg", req, false) + rmrMessengerMock.AssertCalled(t, "SendMsg", req, true) } func TestShutdownExpiredE2T_InternalError(t *testing.T) { @@ -188,7 +188,7 @@ func TestExecute_Two_E2TExpired(t *testing.T) { readerMock.On("GetE2TAddresses").Return(addresses, nil) readerMock.On("GetE2TInstances",addresses).Return([]*entities.E2TInstance{e2tInstance1}, nil) e2tShutdownManagerMock.On("Shutdown", e2tInstance1).Return(nil) - rmrMessengerMock.On("SendMsg", mock.Anything, false).Return(&rmrCgo.MBuf{}, nil) + rmrMessengerMock.On("SendMsg", mock.Anything, true).Return(&rmrCgo.MBuf{}, nil) go e2tKeepAliveWorker.Execute() @@ -197,6 +197,6 @@ func TestExecute_Two_E2TExpired(t *testing.T) { var payload, xAction []byte req := rmrCgo.NewMBuf(rmrCgo.E2_TERM_KEEP_ALIVE_REQ, 0, "", &payload, &xAction) - rmrMessengerMock.AssertCalled(t, "SendMsg", req, false) + rmrMessengerMock.AssertCalled(t, "SendMsg", req, true) e2tShutdownManagerMock.AssertCalled(t, "Shutdown", e2tInstance1) } \ No newline at end of file -- 2.16.6