From: Henrik Andersson Date: Wed, 19 Jan 2022 11:49:10 +0000 (+0000) Subject: Merge "Update documentation for DMaaP Mediator Producer" X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=8170f78af913d337f874477ba5dd93411e9e69da;hp=-c;p=nonrtric.git Merge "Update documentation for DMaaP Mediator Producer" --- 8170f78af913d337f874477ba5dd93411e9e69da diff --combined dmaap-mediator-producer/internal/jobs/jobs_test.go index e4f20e18,2dc700b9..7d021046 --- a/dmaap-mediator-producer/internal/jobs/jobs_test.go +++ b/dmaap-mediator-producer/internal/jobs/jobs_test.go @@@ -38,7 -38,7 +38,7 @@@ import "oransc.org/nonrtric/dmaapmediatorproducer/mocks" ) - func TestJobsManagerGetTypes_shouldReturnSliceOfTypesAndProvideSupportedTypes(t *testing.T) { + func TestJobsManagerLoadTypesFromConfiguration_shouldReturnSliceOfTypesAndProvideSupportedTypes(t *testing.T) { assertions := require.New(t) managerUnderTest := NewJobsManagerImpl(nil, "", kafkaclient.KafkaFactoryImpl{}, nil) @@@ -388,7 -388,7 +388,7 @@@ func TestJobWithBufferedParameters_shou distributeClientMock := NewTestClient(func(req *http.Request) *http.Response { if req.URL.String() == "http://consumerHost/target" { assertions.Equal(req.Method, "POST") - assertions.Equal(`"[{\"data\": 1},{\"data\": 2}]"`, getBodyAsString(req, t)) + assertions.Equal(`["{\"data\": 1}","{\"data\": 2}","ABCDEFGH"]`, getBodyAsString(req, t)) assertions.Equal("application/json", req.Header.Get("Content-Type")) wg.Done() return &http.Response{ @@@ -418,7 -418,6 +418,7 @@@ go func() { jobUnderTest.messagesChannel <- []byte(`{"data": 1}`) jobUnderTest.messagesChannel <- []byte(`{"data": 2}`) + jobUnderTest.messagesChannel <- []byte("ABCDEFGH") }() if waitTimeout(&wg, 2*time.Second) { @@@ -443,7 -442,7 +443,7 @@@ func TestJobReadMoreThanBufferSizeMessa MaxTimeMiliseconds: 200, }) - assertions.Equal([]byte("\"[0,1]\""), msgs) + assertions.Equal([]byte("[\"0\",\"1\"]"), msgs) } func TestJobReadBufferedWhenTimeout_shouldOnlyReturnMessagesSentBeforeTimeout(t *testing.T) { assertions := require.New(t) @@@ -462,7 -461,7 +462,7 @@@ MaxTimeMiliseconds: 30, }) - assertions.Equal([]byte("\"[0,1]\""), msgs) + assertions.Equal([]byte("[\"0\",\"1\"]"), msgs) } func fillMessagesBuffer(mc chan []byte) {