X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=E2Manager%2Fhandlers%2Frmrmsghandlers%2Fran_lost_connection_handler_test.go;h=836c02a0298f27f0bd1f23ee4b9868f85d25ea33;hb=31a781cfece23cf447792e9be4f7cbc4834a782c;hp=1220c792ef9677d1253ee50a5e87ea18db4efae6;hpb=63b5d926f439ca666378697ec81d893fc633dae5;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/handlers/rmrmsghandlers/ran_lost_connection_handler_test.go b/E2Manager/handlers/rmrmsghandlers/ran_lost_connection_handler_test.go index 1220c79..836c02a 100644 --- a/E2Manager/handlers/rmrmsghandlers/ran_lost_connection_handler_test.go +++ b/E2Manager/handlers/rmrmsghandlers/ran_lost_connection_handler_test.go @@ -80,10 +80,13 @@ func setupLostConnectionHandlerTestWithRealReconnectionManager(t *testing.T, isS origNodebInfo := &entities.NodebInfo{RanName: ranName, GlobalNbId: &entities.GlobalNbId{PlmnId: "xxx", NbId: "yyy"}, ConnectionStatus: entities.ConnectionStatus_CONNECTING, ConnectionAttempts: 20, AssociatedE2TInstanceAddress: e2tAddress} var rnibErr error readerMock.On("GetNodeb", ranName).Return(origNodebInfo, rnibErr) - updatedNodebInfo := *origNodebInfo - updatedNodebInfo.ConnectionStatus = entities.ConnectionStatus_DISCONNECTED - updatedNodebInfo.AssociatedE2TInstanceAddress = "" - writerMock.On("UpdateNodebInfo", &updatedNodebInfo).Return(rnibErr) + updatedNodebInfo1 := *origNodebInfo + updatedNodebInfo1.ConnectionStatus = entities.ConnectionStatus_DISCONNECTED + writerMock.On("UpdateNodebInfo", &updatedNodebInfo1).Return(rnibErr) + updatedNodebInfo2 := *origNodebInfo + updatedNodebInfo2.ConnectionStatus = entities.ConnectionStatus_DISCONNECTED + updatedNodebInfo2.AssociatedE2TInstanceAddress = "" + writerMock.On("UpdateNodebInfo", &updatedNodebInfo2).Return(rnibErr) e2tInstance := &entities.E2TInstance{Address: e2tAddress, AssociatedRanList:[]string{ranName}} readerMock.On("GetE2TInstance", e2tAddress).Return(e2tInstance, nil) e2tInstanceToSave := *e2tInstance