[RIC-475] Use SetAndPublish in RNIB writer 15/4215/1
authoridanshal <idan.shalom@intl.att.com>
Mon, 22 Jun 2020 09:41:02 +0000 (12:41 +0300)
committeridanshal <idan.shalom@intl.att.com>
Mon, 22 Jun 2020 09:41:06 +0000 (12:41 +0300)
Change-Id: I4a471287877f2eabb2ae77634026d9601b9ba02e
Signed-off-by: idanshal <idan.shalom@intl.att.com>
E2Manager/container-tag.yaml
E2Manager/rNibWriter/rNibWriter.go
E2Manager/rNibWriter/rNibWriter_test.go

index c403cbe..e9c341b 100644 (file)
@@ -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: 5.2.4
+tag: 5.2.5
index 7322035..3186d70 100644 (file)
@@ -359,9 +359,7 @@ func (w *rNibWriterInstance) UpdateNodebInfoOnConnectionStatusInversion(nodebInf
                return err
        }
 
-       //TODO: Handle "Redis deployment doesn't support MSETMPUB command" when executing SetAndPublish
-       //err = w.sdl.SetAndPublish([]string{stateChangeMessageChannel, event}, pairs)
-       err = w.sdl.Set(pairs)
+       err = w.sdl.SetAndPublish([]string{stateChangeMessageChannel, event}, pairs)
 
        if err != nil {
                return common.NewInternalError(err)
index ab67b80..ec21c3f 100644 (file)
@@ -762,9 +762,7 @@ func TestUpdateNodebInfoOnConnectionStatusInversionSuccess(t *testing.T) {
        setExpected = append(setExpected, nodebNameKey, data)
        setExpected = append(setExpected, nodebIdKey, data)
 
-       sdlInstanceMock.On("Set", []interface{}{setExpected}).Return(e)
-       // TODO: after SetAndPublish problem is solved, bring back this line
-       // sdlInstanceMock.On("SetAndPublish", []string{channelName, eventName}, []interface{}{setExpected}).Return(e)
+       sdlInstanceMock.On("SetAndPublish", []string{channelName, eventName}, []interface{}{setExpected}).Return(e)
 
        rNibErr := w.UpdateNodebInfoOnConnectionStatusInversion(nodebInfo, channelName, eventName)
        assert.Nil(t, rNibErr)
@@ -790,9 +788,7 @@ func TestUpdateNodebInfoOnConnectionStatusInversionMissingInventoryNameFailure(t
        setExpected = append(setExpected, nodebNameKey, data)
        setExpected = append(setExpected, nodebIdKey, data)
 
-       sdlInstanceMock.On("Set", []interface{}{setExpected}).Return(e)
-       // TODO: after SetAndPublish problem is solved, bring back this line
-       //sdlInstanceMock.On("SetAndPublish", []string{channelName, eventName}, []interface{}{setExpected}).Return(e)
+       sdlInstanceMock.On("SetAndPublish", []string{channelName, eventName}, []interface{}{setExpected}).Return(e)
 
        rNibErr := w.UpdateNodebInfoOnConnectionStatusInversion(nodebInfo, channelName, eventName)
 
@@ -816,9 +812,7 @@ func TestUpdateNodebInfoOnConnectionStatusInversionMissingGlobalNbId(t *testing.
 
        nodebNameKey := fmt.Sprintf("RAN:%s", inventoryName)
        setExpected = append(setExpected, nodebNameKey, data)
-       sdlInstanceMock.On("Set", []interface{}{setExpected}).Return(e)
-       // TODO: after SetAndPublish problem is solved, bring back this line
-       //sdlInstanceMock.On("SetAndPublish", []string{channelName, eventName}, []interface{}{setExpected}).Return(e)
+       sdlInstanceMock.On("SetAndPublish", []string{channelName, eventName}, []interface{}{setExpected}).Return(e)
 
        rNibErr := w.UpdateNodebInfoOnConnectionStatusInversion(nodebInfo, channelName, eventName)