-
Notifications
You must be signed in to change notification settings - Fork 266
ensure at least one batch before merging #613
ensure at least one batch before merging #613
Conversation
working on the tests here: tsdeng#1 |
implicit def timeExtractor[T <: (Long, Any)] = TestUtil.simpleTimeExtractor[T] | ||
|
||
implicit val arbitraryInputWithTimeStampAndBatcher: Arbitrary[(List[(Long, Int)], Batcher, TestStore[Int, Int])] = Arbitrary { | ||
Arbitrary.arbitrary[List[Int]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.zip or .join with Arbitrary.arbitrary[Map[Int, Int]]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't have two maps back to back, just do one.
Also, maybe for comprehension here.
…es the batcher to be at least 2ms
Hi, @johnynek |
(timeMode: (Interval[Timestamp], Mode)) => | ||
{ | ||
val (time: Interval[Timestamp], mode: Mode) = timeMode | ||
val a: FlowToPipe[(Int, Int)] = Reader { (fdM: (FlowDef, Mode)) => TypedPipe.from[(Timestamp, (Int, Int))](Seq((Timestamp(10), (2, 3)))) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you have the fake data here? Why not use PipeFactory[Nothing]
which is a subclass of all PipeFactories? TypedPipe.empty gives you a TypedPipe[Nothing]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's because for merging, if it returns a TypedPipe[Nothing], then I need to define a semigroup of Nothing
…merging ensure at least one batch before merging
retry of
#612
the check of "at least one batch is covered by timespan" only applies to merging.