Merge pull request #27045 from chbatey/scalafmt-RC7
Upgrade scalafmt to 2.0.0-RC7
This commit is contained in:
commit
11453aad5d
6 changed files with 39 additions and 44 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
version = 2.0.0-RC5
|
version = 2.0.0-RC7
|
||||||
|
|
||||||
style = defaultWithAlign
|
style = defaultWithAlign
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,8 @@ class LocalActorRefProviderSpec extends AkkaSpec(LocalActorRefProviderSpec.confi
|
||||||
for (i <- 0 until 100) {
|
for (i <- 0 until 100) {
|
||||||
val address = "new-actor" + i
|
val address = "new-actor" + i
|
||||||
implicit val timeout = Timeout(5 seconds)
|
implicit val timeout = Timeout(5 seconds)
|
||||||
val actors = for (_ <- 1 to 4)
|
val actors =
|
||||||
|
for (_ <- 1 to 4)
|
||||||
yield Future(system.actorOf(Props(new Actor { def receive = { case _ => } }), address))
|
yield Future(system.actorOf(Props(new Actor { def receive = { case _ => } }), address))
|
||||||
val set = Set() ++ actors.map(a =>
|
val set = Set() ++ actors.map(a =>
|
||||||
Await.ready(a, timeout.duration).value match {
|
Await.ready(a, timeout.duration).value match {
|
||||||
|
|
|
||||||
|
|
@ -298,8 +298,7 @@ trait SchedulerSpec extends BeforeAndAfterEach with DefaultTimeout with Implicit
|
||||||
}
|
}
|
||||||
val latencies = within(10.seconds) {
|
val latencies = within(10.seconds) {
|
||||||
for (i <- 1 to N)
|
for (i <- 1 to N)
|
||||||
yield
|
yield try expectMsgType[Long]
|
||||||
try expectMsgType[Long]
|
|
||||||
catch {
|
catch {
|
||||||
case NonFatal(e) => throw new Exception(s"failed expecting the $i-th latency", e)
|
case NonFatal(e) => throw new Exception(s"failed expecting the $i-th latency", e)
|
||||||
}
|
}
|
||||||
|
|
@ -371,8 +370,7 @@ class LightArrayRevolverSchedulerSpec extends AkkaSpec(SchedulerSpec.testConfRev
|
||||||
println(cancelled)
|
println(cancelled)
|
||||||
val latencies = within(10.seconds) {
|
val latencies = within(10.seconds) {
|
||||||
for (i <- 1 to (N - cancelled))
|
for (i <- 1 to (N - cancelled))
|
||||||
yield
|
yield try expectMsgType[Long]
|
||||||
try expectMsgType[Long]
|
|
||||||
catch {
|
catch {
|
||||||
case NonFatal(e) => throw new Exception(s"failed expecting the $i-th latency", e)
|
case NonFatal(e) => throw new Exception(s"failed expecting the $i-th latency", e)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,7 @@ class CircuitBreakerMTSpec extends AkkaSpec {
|
||||||
def testCallsWithBreaker(): immutable.IndexedSeq[Future[String]] = {
|
def testCallsWithBreaker(): immutable.IndexedSeq[Future[String]] = {
|
||||||
val aFewActive = new TestLatch(5)
|
val aFewActive = new TestLatch(5)
|
||||||
for (_ <- 1 to numberOfTestCalls)
|
for (_ <- 1 to numberOfTestCalls)
|
||||||
yield
|
yield breaker
|
||||||
breaker
|
|
||||||
.withCircuitBreaker(Future {
|
.withCircuitBreaker(Future {
|
||||||
aFewActive.countDown()
|
aFewActive.countDown()
|
||||||
Await.ready(aFewActive, 5.seconds.dilated)
|
Await.ready(aFewActive, 5.seconds.dilated)
|
||||||
|
|
|
||||||
|
|
@ -131,8 +131,7 @@ object StandardMetrics {
|
||||||
for {
|
for {
|
||||||
used <- nodeMetrics.metric(HeapMemoryUsed)
|
used <- nodeMetrics.metric(HeapMemoryUsed)
|
||||||
committed <- nodeMetrics.metric(HeapMemoryCommitted)
|
committed <- nodeMetrics.metric(HeapMemoryCommitted)
|
||||||
} yield
|
} yield (
|
||||||
(
|
|
||||||
nodeMetrics.address,
|
nodeMetrics.address,
|
||||||
nodeMetrics.timestamp,
|
nodeMetrics.timestamp,
|
||||||
used.smoothValue.longValue,
|
used.smoothValue.longValue,
|
||||||
|
|
@ -183,8 +182,7 @@ object StandardMetrics {
|
||||||
nodeMetrics: NodeMetrics): Option[(Address, Long, Option[Double], Option[Double], Option[Double], Int)] = {
|
nodeMetrics: NodeMetrics): Option[(Address, Long, Option[Double], Option[Double], Option[Double], Int)] = {
|
||||||
for {
|
for {
|
||||||
processors <- nodeMetrics.metric(Processors)
|
processors <- nodeMetrics.metric(Processors)
|
||||||
} yield
|
} yield (
|
||||||
(
|
|
||||||
nodeMetrics.address,
|
nodeMetrics.address,
|
||||||
nodeMetrics.timestamp,
|
nodeMetrics.timestamp,
|
||||||
nodeMetrics.metric(SystemLoadAverage).map(_.smoothValue),
|
nodeMetrics.metric(SystemLoadAverage).map(_.smoothValue),
|
||||||
|
|
|
||||||
|
|
@ -117,8 +117,7 @@ trait PersistenceMatchers {
|
||||||
nrs = seq.map(_.replaceFirst(prefixes(pos), "").toInt)
|
nrs = seq.map(_.replaceFirst(prefixes(pos), "").toInt)
|
||||||
sortedNrs = nrs.sorted
|
sortedNrs = nrs.sorted
|
||||||
if nrs != sortedNrs
|
if nrs != sortedNrs
|
||||||
} yield
|
} yield MatchResult(
|
||||||
MatchResult(
|
|
||||||
false,
|
false,
|
||||||
s"""Messages sequence with prefix ${prefixes(pos)} was not sorted! Was: $seq"""",
|
s"""Messages sequence with prefix ${prefixes(pos)} was not sorted! Was: $seq"""",
|
||||||
s"""Messages sequence with prefix ${prefixes(pos)} was sorted! Was: $seq"""")
|
s"""Messages sequence with prefix ${prefixes(pos)} was sorted! Was: $seq"""")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue