format source with scalafmt

This commit is contained in:
Auto Format 2019-03-11 10:38:24 +01:00 committed by Patrik Nordwall
parent 0f40491d42
commit ce404e4f53
1669 changed files with 43208 additions and 35404 deletions

View file

@ -82,7 +82,7 @@ object DistributedDataDocSpec {
} else {
// remove
log.info("Removing: {}", s)
replicator ! Update(DataKey, ORSet.empty[String], WriteLocal)(_ remove s)
replicator ! Update(DataKey, ORSet.empty[String], WriteLocal)(_.remove(s))
}
case _: UpdateResponse[_] => // ignore
@ -131,13 +131,13 @@ class DistributedDataDocSpec extends AkkaSpec(DistributedDataDocSpec.config) {
//#update-response1
case UpdateSuccess(Counter1Key, req) => // ok
//#update-response1
case unexpected => fail("Unexpected response: " + unexpected)
case unexpected => fail("Unexpected response: " + unexpected)
}
probe.expectMsgType[UpdateResponse[_]] match {
//#update-response2
case UpdateSuccess(Set1Key, req) => // ok
case UpdateTimeout(Set1Key, req) =>
case UpdateSuccess(Set1Key, req) => // ok
case UpdateTimeout(Set1Key, req) =>
// write to 3 nodes failed within 1.second
//#update-response2
case UpdateSuccess(Set2Key, None) =>
@ -200,7 +200,7 @@ class DistributedDataDocSpec extends AkkaSpec(DistributedDataDocSpec.config) {
val value = g.get(Counter1Key).value
case NotFound(Counter1Key, req) => // key counter1 does not exist
//#get-response1
case unexpected => fail("Unexpected response: " + unexpected)
case unexpected => fail("Unexpected response: " + unexpected)
}
probe.expectMsgType[GetResponse[_]] match {
@ -209,7 +209,7 @@ class DistributedDataDocSpec extends AkkaSpec(DistributedDataDocSpec.config) {
val elements = g.get(Set1Key).elements
case GetFailure(Set1Key, req) =>
// read from 3 nodes failed within 1.second
case NotFound(Set1Key, req) => // key set1 does not exist
case NotFound(Set1Key, req) => // key set1 does not exist
//#get-response2
case g @ GetSuccess(Set2Key, None) =>
val elements = g.get(Set2Key).elements
@ -292,7 +292,7 @@ class DistributedDataDocSpec extends AkkaSpec(DistributedDataDocSpec.config) {
val c0 = PNCounter.empty
val c1 = c0 :+ 1
val c2 = c1 :+ 7
val c3: PNCounter = c2 decrement 2
val c3: PNCounter = c2.decrement(2)
println(c3.value) // 6
//#pncounter
}
@ -328,7 +328,7 @@ class DistributedDataDocSpec extends AkkaSpec(DistributedDataDocSpec.config) {
val s0 = ORSet.empty[String]
val s1 = s0 :+ "a"
val s2 = s1 :+ "b"
val s3 = s2 remove "a"
val s3 = s2.remove("a")
println(s3.elements) // b
//#orset
}