aboutsummaryrefslogtreecommitdiffstats
path: root/hv-collector-test-utils/src/main/kotlin/org
diff options
context:
space:
mode:
authorFilip Krzywka <filip.krzywka@nokia.com>2018-09-21 10:14:03 +0200
committerFilip Krzywka <filip.krzywka@nokia.com>2018-09-24 08:22:29 +0200
commite880cde732b6d5b6a2fd22b2245ba7f6ff4517f3 (patch)
tree256bd77a86bf86fce96979643a9fe5fcc0318aba /hv-collector-test-utils/src/main/kotlin/org
parent7333951cfec6b79a92b12e70cf679bff2f01825a (diff)
Remove end-of-transmission message from protocol
Also update protobuf files definitions to latest version. Change-Id: I0cd5d2d8deec5c787e2d3948d3d905fa672f9fea Issue-ID: DCAEGEN2-775 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
Diffstat (limited to 'hv-collector-test-utils/src/main/kotlin/org')
-rw-r--r--hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/messages.kt11
-rw-r--r--hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/vesEvents.kt2
2 files changed, 5 insertions, 8 deletions
diff --git a/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/messages.kt b/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/messages.kt
index 78042260..85bdcab7 100644
--- a/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/messages.kt
+++ b/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/messages.kt
@@ -23,8 +23,8 @@ import com.google.protobuf.ByteString
import io.netty.buffer.ByteBuf
import io.netty.buffer.ByteBufAllocator
import io.netty.buffer.PooledByteBufAllocator
-import org.onap.dcae.collectors.veshv.domain.PayloadWireFrameMessage.Companion.MAX_PAYLOAD_SIZE
-import org.onap.dcae.collectors.veshv.domain.PayloadWireFrameMessage.Companion.RESERVED_BYTE_COUNT
+import org.onap.dcae.collectors.veshv.domain.WireFrameMessage.Companion.MAX_PAYLOAD_SIZE
+import org.onap.dcae.collectors.veshv.domain.WireFrameMessage.Companion.RESERVED_BYTE_COUNT
import org.onap.dcae.collectors.veshv.domain.VesEventDomain
import org.onap.dcae.collectors.veshv.domain.VesEventDomain.HVMEAS
import org.onap.dcae.collectors.veshv.domain.VesEventDomain.OTHER
@@ -52,9 +52,6 @@ fun vesWireFrameMessage(domain: VesEventDomain = OTHER,
writeBytes(gpb) // ves event as GPB bytes
}
-fun endOfTransmissionWireMessage(): ByteBuf =
- allocator.buffer().writeByte(0xAA)
-
fun wireFrameMessageWithInvalidPayload(): ByteBuf = allocator.buffer().run {
writeValidWireFrameHeaders()
@@ -69,8 +66,8 @@ fun garbageFrame(): ByteBuf = allocator.buffer().run {
fun invalidWireFrame(): ByteBuf = allocator.buffer().run {
writeByte(0xFF)
- writeByte(0x01) // version
- writeByte(0x01) // content type = GPB
+ writeByte(0x01) // version major
+ writeByte(0x01) // version minor
}
fun vesMessageWithTooBigPayload(domain: VesEventDomain = HVMEAS): ByteBuf =
diff --git a/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/vesEvents.kt b/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/vesEvents.kt
index 0341c2ff..57b960af 100644
--- a/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/vesEvents.kt
+++ b/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/vesEvents.kt
@@ -39,7 +39,7 @@ fun vesEvent(commonEventHeader: CommonEventHeader,
hvRanMeasFields: ByteString = ByteString.EMPTY): VesEventOuterClass.VesEvent =
VesEventOuterClass.VesEvent.newBuilder()
.setCommonEventHeader(commonEventHeader)
- .setHvMeasFields(hvRanMeasFields)
+ .setEventFields(hvRanMeasFields)
.build()
fun commonHeader(domain: VesEventDomain = HVMEAS,