From 2cfdd9bb40b33c8d01b91051354df1bdf0543a5e Mon Sep 17 00:00:00 2001 From: Jendrik Date: Wed, 27 Sep 2017 11:24:55 +0200 Subject: [PATCH] simplified: adding of records; replaying of records --- src/main/scala/MockedStreams.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/MockedStreams.scala b/src/main/scala/MockedStreams.scala index fcc0b94..dc14adf 100644 --- a/src/main/scala/MockedStreams.scala +++ b/src/main/scala/MockedStreams.scala @@ -50,7 +50,7 @@ object MockedStreams { val updatedRecords = newRecords.foldLeft(inputs) { case (events, (k, v)) => val newRecord = Record(topic, keySer.serialize(topic, k), valSer.serialize(topic, v)) - newRecord :: events + events :+ newRecord } this.copy(inputs = updatedRecords) @@ -105,7 +105,7 @@ object MockedStreams { } private def produce(driver: Driver): Unit = { - inputs.reverse.foreach{ + inputs.foreach{ case Record(topic, key, value) => driver.process(topic, key, value) }