Fixed akka-stream-tests-tck warnings (#27436)

This commit is contained in:
Helena Edelson 2019-07-30 08:33:48 -07:00 committed by GitHub
parent 01f5698677
commit 914466c8c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 15 deletions

View file

@ -31,7 +31,7 @@ class FilePublisherTest extends AkkaPublisherVerification[ByteString] {
val chunk = "x" * ChunkSize
val fw = Files.newBufferedWriter(f)
for (i <- 1 to Elements) fw.append(chunk)
List.fill(Elements)(chunk).foreach(fw.append)
fw.close()
f
}

View file

@ -18,12 +18,7 @@ class GroupByTest extends AkkaPublisherVerification[Int] {
if (elements == 0) EmptyPublisher[Int]
else {
val futureGroupSource =
Source(iterable(elements))
.groupBy(1, elem => "all")
.prefixAndTail(0)
.map(_._2)
.concatSubstreams
.runWith(Sink.head)
Source(iterable(elements)).groupBy(1, _ => "all").prefixAndTail(0).map(_._2).concatSubstreams.runWith(Sink.head)
val groupSource = Await.result(futureGroupSource, 3.seconds)
groupSource.runWith(Sink.asPublisher(false))

View file

@ -18,12 +18,7 @@ class SplitWhenTest extends AkkaPublisherVerification[Int] {
if (elements == 0) EmptyPublisher[Int]
else {
val futureSource =
Source(iterable(elements))
.splitWhen(elem => false)
.prefixAndTail(0)
.map(_._2)
.concatSubstreams
.runWith(Sink.head)
Source(iterable(elements)).splitWhen(_ => false).prefixAndTail(0).map(_._2).concatSubstreams.runWith(Sink.head)
val source = Await.result(futureSource, 3.seconds)
source.runWith(Sink.asPublisher(false))
}

View file

@ -22,8 +22,7 @@ object AkkaDisciplinePlugin extends AutoPlugin with ScalafixSupport {
"akka-docs",
// To be reviewed
"akka-bench-jmh",
"akka-bench-jmh-typed",
"akka-stream-tests-tck")
"akka-bench-jmh-typed")
val strictProjects = Set("akka-discovery", "akka-protobuf", "akka-coordination")