diff options
author | Przemyslaw Wasala <przemyslaw.wasala@nokia.com> | 2018-09-24 10:11:42 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-09-24 10:11:42 +0000 |
commit | 7b269674526a267f14895df8b825f3b59b30b98a (patch) | |
tree | 606cdabf7354c0d2a70aa2e0c63a1e36c0a76d1a /hv-collector-ct | |
parent | 8f4a019fb04f0b3c408179ae1ae6daa9b742cdba (diff) | |
parent | e880cde732b6d5b6a2fd22b2245ba7f6ff4517f3 (diff) |
Merge "Remove end-of-transmission message from protocol"
Diffstat (limited to 'hv-collector-ct')
-rw-r--r-- | hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/VesHvSpecification.kt | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/VesHvSpecification.kt b/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/VesHvSpecification.kt index 60e10ee0..3eba9b6b 100644 --- a/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/VesHvSpecification.kt +++ b/hv-collector-ct/src/test/kotlin/org/onap/dcae/collectors/veshv/tests/component/VesHvSpecification.kt @@ -37,7 +37,6 @@ import org.onap.dcae.collectors.veshv.tests.fakes.basicConfiguration import org.onap.dcae.collectors.veshv.tests.fakes.configurationWithDifferentRouting import org.onap.dcae.collectors.veshv.tests.fakes.configurationWithoutRouting import org.onap.dcae.collectors.veshv.tests.fakes.twoDomainsToOneTopicConfiguration -import org.onap.dcae.collectors.veshv.tests.utils.endOfTransmissionWireMessage import org.onap.dcae.collectors.veshv.tests.utils.garbageFrame import org.onap.dcae.collectors.veshv.tests.utils.invalidWireFrame import org.onap.dcae.collectors.veshv.tests.utils.vesMessageWithTooBigPayload @@ -66,30 +65,6 @@ object VesHvSpecification : Spek({ .describedAs("should send all events") .hasSize(2) } - - it("should not handle messages received from client after end-of-transmission message") { - val (sut, sink) = vesHvWithStoringSink() - val validMessage = vesWireFrameMessage(HVMEAS) - val anotherValidMessage = vesWireFrameMessage(HVMEAS) - val endOfTransmissionMessage = endOfTransmissionWireMessage() - - val handledEvents = sut.handleConnection(sink, - validMessage, - endOfTransmissionMessage, - anotherValidMessage - ) - - assertThat(handledEvents).hasSize(1) - assertThat(validMessage.refCnt()) - .describedAs("first message should be released") - .isEqualTo(0) - assertThat(endOfTransmissionMessage.refCnt()) - .describedAs("end-of-transmission message should be released") - .isEqualTo(0) - assertThat(anotherValidMessage.refCnt()) - .describedAs("second (not handled) message should not be released") - .isEqualTo(1) - } } describe("Memory management") { @@ -116,26 +91,6 @@ object VesHvSpecification : Spek({ .isEqualTo(expectedRefCnt) } - it("should release memory for end-of-transmission message") { - val (sut, sink) = vesHvWithStoringSink() - val validMessage = vesWireFrameMessage(HVMEAS) - val endOfTransmissionMessage = endOfTransmissionWireMessage() - val expectedRefCnt = 0 - - val handledEvents = sut.handleConnection(sink, - validMessage, - endOfTransmissionMessage - ) - - assertThat(handledEvents).hasSize(1) - assertThat(validMessage.refCnt()) - .describedAs("handled message should be released") - .isEqualTo(expectedRefCnt) - assertThat(endOfTransmissionMessage.refCnt()) - .describedAs("end-of-transmission message should be released") - .isEqualTo(expectedRefCnt) - } - it("should release memory for each message with invalid payload") { val (sut, sink) = vesHvWithStoringSink() val validMessage = vesWireFrameMessage(HVMEAS) |