Skip to content

Commit

Permalink
Moved rechunking with large ending chunk test to the combinator suite
Browse files Browse the repository at this point in the history
  • Loading branch information
domaspoliakas committed Aug 15, 2023
1 parent 7bddd07 commit b46a9ae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
10 changes: 10 additions & 0 deletions core/shared/src/test/scala/fs2/StreamCombinatorsSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1354,6 +1354,16 @@ class StreamCombinatorsSuite extends Fs2Suite {
}
}
}

test("rechunkRandomlyWithSeed should correclty rechunk big chunks at the end of a stream") {
val chunks = Stream
.chunk(Chunk.seq(List.fill(5000)(1)))
.rechunkRandomlyWithSeed(0.01, 0.1)(1L)
.chunks
.compile
.toList
assert(chunks.forall(_.size < 500))
}
}

group("rechunkRandomly") {
Expand Down
9 changes: 0 additions & 9 deletions core/shared/src/test/scala/fs2/StreamSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1042,13 +1042,4 @@ class StreamSuite extends Fs2Suite {
}
}

test("rechunkRandomlyWithSeed should correclty rechunk big chunks at the end of a stream") {
val chunks = Stream
.chunk(Chunk.seq(List.fill(5000)(1)))
.rechunkRandomlyWithSeed(0.01, 0.1)(1L)
.chunks
.compile
.toList
assert(chunks.forall(_.size < 500))
}
}

0 comments on commit b46a9ae

Please sign in to comment.