From f4a58fbdbcaaba92a4daae0e2807536c3da4c857 Mon Sep 17 00:00:00 2001 From: Jakub Dudycz Date: Wed, 18 Jul 2018 14:33:10 +0200 Subject: Support scenarios for continuous streaming test Added support for below scenarios -too big payloads -invalid wire frames -invalid GPB data -unsupported domains Changed input json for xnf simulator endpoint Closes ONAP-500 Change-Id: I19e84a76cef501e274ea8152f3c33c95dddcaac9 Signed-off-by: Jakub Dudycz Issue-ID: DCAEGEN2-601 --- .../veshv/tests/component/PerformanceSpecification.kt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'hv-collector-ct') diff --git a/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/PerformanceSpecification.kt b/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/PerformanceSpecification.kt index b793f3aa..4953d8f3 100644 --- a/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/PerformanceSpecification.kt +++ b/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/PerformanceSpecification.kt @@ -29,7 +29,9 @@ import org.onap.dcae.collectors.veshv.domain.WireFrameEncoder import org.onap.dcae.collectors.veshv.tests.fakes.CountingSink import org.onap.dcae.collectors.veshv.tests.fakes.basicConfiguration import org.onap.dcae.collectors.veshv.ves.message.generator.api.MessageGenerator -import org.onap.dcae.collectors.veshv.ves.message.generator.config.MessageParameters +import org.onap.dcae.collectors.veshv.ves.message.generator.api.MessageParameters +import org.onap.dcae.collectors.veshv.ves.message.generator.api.MessageType.VALID +import org.onap.ves.VesEventV5.VesEvent.CommonEventHeader.Domain.HVRANMEAS import reactor.core.publisher.Flux import reactor.math.sum import java.security.MessageDigest @@ -55,8 +57,10 @@ object PerformanceSpecification : Spek({ val timeout = Duration.ofMinutes((1 + (runs / 2)).toLong()) val params = MessageParameters( - commonEventHeader = vesEvent().commonEventHeader, + domain = HVRANMEAS, + messageType = VALID, amount = numMessages) + val fluxes = (1.rangeTo(runs)).map { sut.collector.handleConnection(sut.alloc, generateDataStream(sut.alloc, params)) } @@ -82,7 +86,8 @@ object PerformanceSpecification : Spek({ val timeout = Duration.ofSeconds(30) val params = MessageParameters( - commonEventHeader = vesEvent().commonEventHeader, + domain = HVRANMEAS, + messageType = VALID, amount = numMessages) val dataStream = generateDataStream(sut.alloc, params) @@ -162,7 +167,7 @@ fun dropWhenIndex(predicate: (Long) -> Boolean, stream: Flux): Flux = WireFrameEncoder(alloc).let { encoder -> MessageGenerator.INSTANCE - .createMessageFlux(params) + .createMessageFlux(listOf(params)) .map(encoder::encode) .transform { simulateRemoteTcp(alloc, 1000, it) } } -- cgit 1.2.3-korg