{"action":"created","comment":{"url":"https://api.github.com/repos/akka/akka/pulls/comments/36786409","id":36786409,"diff_hunk":"@@ -0,0 +1,122 @@\n+/**\n+ * Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com>\n+ */\n+package akka.cluster\n+\n+import scala.collection.immutable\n+import scala.language.postfixOps\n+import scala.concurrent.duration._\n+import akka.actor.Address\n+import akka.cluster.MemberStatus._\n+import akka.remote.testkit.MultiNodeConfig\n+import akka.remote.testkit.MultiNodeSpec\n+import akka.testkit._\n+import com.typesafe.config.ConfigFactory\n+import org.scalatest.BeforeAndAfter\n+import akka.actor.ActorSystem\n+import akka.actor.ActorRef\n+import akka.event.Logging.Info\n+import akka.actor.Actor\n+import akka.actor.Props\n+\n+object NodeChurnMultiJvmSpec extends MultiNodeConfig {\n+  val first = role(\"first\")\n+  val second = role(\"second\")\n+  val third = role(\"third\")\n+\n+  commonConfig(debugConfig(on = false).\n+    withFallback(ConfigFactory.parseString(\"\"\"\n+      akka.cluster.auto-down-unreachable-after = 1s\n+      akka.remote.log-frame-size-exceeding = 2000b\n+      \"\"\")).\n+    withFallback(MultiNodeClusterSpec.clusterConfig))\n+\n+  class LogListener(testActor: ActorRef) extends Actor {\n+    def receive = {\n+      case Info(_, _, msg: String) if msg.startsWith(\"New maximum payload size for [akka.cluster.GossipEnvelope]\") ⇒\n+        testActor ! msg\n+      case _ ⇒\n+    }\n+  }\n+}\n+\n+class NodeChurnMultiJvmNode1 extends NodeChurnSpec\n+class NodeChurnMultiJvmNode2 extends NodeChurnSpec\n+class NodeChurnMultiJvmNode3 extends NodeChurnSpec\n+\n+abstract class NodeChurnSpec\n+  extends MultiNodeSpec(NodeChurnMultiJvmSpec)\n+  with MultiNodeClusterSpec with ImplicitSender {\n+\n+  import NodeChurnMultiJvmSpec._\n+\n+  def seedNodes: immutable.IndexedSeq[Address] = Vector(first, second, third)\n+\n+  override def afterAll(): Unit = {\n+    super.afterAll()\n+  }\n+\n+  val rounds = 3\n+\n+  override def expectedTestDuration: FiniteDuration = 45.seconds * rounds\n+\n+  def awaitAllMembersUp(additionaSystems: Vector[ActorSystem]): Unit = {\n+    val numberOfMembers = roles.size + roles.size * additionaSystems.size\n+    awaitMembersUp(numberOfMembers)\n+    awaitAssert {\n+      additionaSystems.foreach { s ⇒\n+        val c = Cluster(s)\n+        c.state.members.size should be(numberOfMembers)\n+        c.state.members.forall(_.status == MemberStatus.Up)\n+      }\n+    }\n+  }\n+\n+  def awaitRemoved(additionaSystems: Vector[ActorSystem]): Unit = {\n+    awaitMembersUp(roles.size, timeout = 40.seconds)\n+    awaitAssert {\n+      additionaSystems.foreach { s ⇒\n+        Cluster(s).isTerminated should be(true)\n+      }\n+    }\n+  }\n+\n+  \"Cluster with short lived members\" must {\n+    \"setup stable nodes\" taggedAs LongRunningTest in within(15.seconds) {\n+      val logListener = system.actorOf(Props(classOf[LogListener], testActor), \"logListener\")\n+      system.eventStream.subscribe(logListener, classOf[Info])\n+      cluster.joinSeedNodes(seedNodes)\n+      awaitMembersUp(roles.size)\n+    }\n+\n+    \"join and remove transient nodes without growing gossip payload\" taggedAs LongRunningTest in {\n+      // This test is configured with log-frame-size-exceeding and the LogListener\n+      // will send to the testActor if unexpected increase in message payload size.\n+      // It will fail after a while if vector clock entries of removed nodes are not pruned.\n+      for (n ← 1 to rounds) {\n+        log.info(\"round-\" + n)","path":"akka-cluster/src/multi-jvm/scala/akka/cluster/NodeChurnSpec.scala","position":97,"original_position":97,"commit_id":"5cf35938d0ec09130fe840752fadc124b2810cf6","original_commit_id":"5cf35938d0ec09130fe840752fadc124b2810cf6","user":{"login":"patriknw","id":336161,"avatar_url":"https://avatars.githubusercontent.com/u/336161?v=3","gravatar_id":"","url":"https://api.github.com/users/patriknw","html_url":"https://github.com/patriknw","followers_url":"https://api.github.com/users/patriknw/followers","following_url":"https://api.github.com/users/patriknw/following{/other_user}","gists_url":"https://api.github.com/users/patriknw/gists{/gist_id}","starred_url":"https://api.github.com/users/patriknw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patriknw/subscriptions","organizations_url":"https://api.github.com/users/patriknw/orgs","repos_url":"https://api.github.com/users/patriknw/repos","events_url":"https://api.github.com/users/patriknw/events{/privacy}","received_events_url":"https://api.github.com/users/patriknw/received_events","type":"User","site_admin":false},"body":"It's not that simple, as you can see in https://github.com/akka/akka/pull/1735\r\nI don't remember all complications.\r\nE.g. we also have tests that intercept logs and verify them.","created_at":"2015-08-11T19:16:39Z","updated_at":"2015-08-11T19:16:39Z","html_url":"https://github.com/akka/akka/pull/17624#discussion_r36786409","pull_request_url":"https://api.github.com/repos/akka/akka/pulls/17624","_links":{"self":{"href":"https://api.github.com/repos/akka/akka/pulls/comments/36786409"},"html":{"href":"https://github.com/akka/akka/pull/17624#discussion_r36786409"},"pull_request":{"href":"https://api.github.com/repos/akka/akka/pulls/17624"}}},"pull_request":{"url":"https://api.github.com/repos/akka/akka/pulls/17624","id":36604434,"html_url":"https://github.com/akka/akka/pull/17624","diff_url":"https://github.com/akka/akka/pull/17624.diff","patch_url":"https://github.com/akka/akka/pull/17624.patch","issue_url":"https://api.github.com/repos/akka/akka/issues/17624","number":17624,"state":"open","locked":false,"title":"=clu #13226 Prune vector clocks from removed member","user":{"login":"patriknw","id":336161,"avatar_url":"https://avatars.githubusercontent.com/u/336161?v=3","gravatar_id":"","url":"https://api.github.com/users/patriknw","html_url":"https://github.com/patriknw","followers_url":"https://api.github.com/users/patriknw/followers","following_url":"https://api.github.com/users/patriknw/following{/other_user}","gists_url":"https://api.github.com/users/patriknw/gists{/gist_id}","starred_url":"https://api.github.com/users/patriknw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patriknw/subscriptions","organizations_url":"https://api.github.com/users/patriknw/orgs","repos_url":"https://api.github.com/users/patriknw/repos","events_url":"https://api.github.com/users/patriknw/events{/privacy}","received_events_url":"https://api.github.com/users/patriknw/received_events","type":"User","site_admin":false},"body":"Refs #13226","created_at":"2015-06-01T07:26:37Z","updated_at":"2015-08-11T19:16:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"68b64e0b3bcc529151b70d77d9dcaf26a2597e3a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/akka/akka/pulls/17624/commits","review_comments_url":"https://api.github.com/repos/akka/akka/pulls/17624/comments","review_comment_url":"https://api.github.com/repos/akka/akka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akka/akka/issues/17624/comments","statuses_url":"https://api.github.com/repos/akka/akka/statuses/5cf35938d0ec09130fe840752fadc124b2810cf6","head":{"label":"akka:wip-13226-vclock-pruning-patriknw","ref":"wip-13226-vclock-pruning-patriknw","sha":"5cf35938d0ec09130fe840752fadc124b2810cf6","user":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?v=3","gravatar_id":"","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"repo":{"id":130013,"name":"akka","full_name":"akka/akka","owner":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?v=3","gravatar_id":"","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akka/akka","description":"Akka Project","fork":false,"url":"https://api.github.com/repos/akka/akka","forks_url":"https://api.github.com/repos/akka/akka/forks","keys_url":"https://api.github.com/repos/akka/akka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akka/akka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akka/akka/teams","hooks_url":"https://api.github.com/repos/akka/akka/hooks","issue_events_url":"https://api.github.com/repos/akka/akka/issues/events{/number}","events_url":"https://api.github.com/repos/akka/akka/events","assignees_url":"https://api.github.com/repos/akka/akka/assignees{/user}","branches_url":"https://api.github.com/repos/akka/akka/branches{/branch}","tags_url":"https://api.github.com/repos/akka/akka/tags","blobs_url":"https://api.github.com/repos/akka/akka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akka/akka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akka/akka/git/refs{/sha}","trees_url":"https://api.github.com/repos/akka/akka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akka/akka/statuses/{sha}","languages_url":"https://api.github.com/repos/akka/akka/languages","stargazers_url":"https://api.github.com/repos/akka/akka/stargazers","contributors_url":"https://api.github.com/repos/akka/akka/contributors","subscribers_url":"https://api.github.com/repos/akka/akka/subscribers","subscription_url":"https://api.github.com/repos/akka/akka/subscription","commits_url":"https://api.github.com/repos/akka/akka/commits{/sha}","git_commits_url":"https://api.github.com/repos/akka/akka/git/commits{/sha}","comments_url":"https://api.github.com/repos/akka/akka/comments{/number}","issue_comment_url":"https://api.github.com/repos/akka/akka/issues/comments{/number}","contents_url":"https://api.github.com/repos/akka/akka/contents/{+path}","compare_url":"https://api.github.com/repos/akka/akka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akka/akka/merges","archive_url":"https://api.github.com/repos/akka/akka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akka/akka/downloads","issues_url":"https://api.github.com/repos/akka/akka/issues{/number}","pulls_url":"https://api.github.com/repos/akka/akka/pulls{/number}","milestones_url":"https://api.github.com/repos/akka/akka/milestones{/number}","notifications_url":"https://api.github.com/repos/akka/akka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akka/akka/labels{/name}","releases_url":"https://api.github.com/repos/akka/akka/releases{/id}","created_at":"2009-02-16T12:51:54Z","updated_at":"2015-08-11T05:34:11Z","pushed_at":"2015-08-11T15:49:14Z","git_url":"git://github.com/akka/akka.git","ssh_url":"git@github.com:akka/akka.git","clone_url":"https://github.com/akka/akka.git","svn_url":"https://github.com/akka/akka","homepage":"http://akka.io","size":266818,"stargazers_count":4307,"watchers_count":4307,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1259,"mirror_url":null,"open_issues_count":736,"forks":1259,"open_issues":736,"watchers":4307,"default_branch":"master"}},"base":{"label":"akka:master","ref":"master","sha":"09aff42d40771cac9535128bebcfb48678e12b00","user":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?v=3","gravatar_id":"","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"repo":{"id":130013,"name":"akka","full_name":"akka/akka","owner":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?v=3","gravatar_id":"","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akka/akka","description":"Akka Project","fork":false,"url":"https://api.github.com/repos/akka/akka","forks_url":"https://api.github.com/repos/akka/akka/forks","keys_url":"https://api.github.com/repos/akka/akka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akka/akka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akka/akka/teams","hooks_url":"https://api.github.com/repos/akka/akka/hooks","issue_events_url":"https://api.github.com/repos/akka/akka/issues/events{/number}","events_url":"https://api.github.com/repos/akka/akka/events","assignees_url":"https://api.github.com/repos/akka/akka/assignees{/user}","branches_url":"https://api.github.com/repos/akka/akka/branches{/branch}","tags_url":"https://api.github.com/repos/akka/akka/tags","blobs_url":"https://api.github.com/repos/akka/akka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akka/akka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akka/akka/git/refs{/sha}","trees_url":"https://api.github.com/repos/akka/akka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akka/akka/statuses/{sha}","languages_url":"https://api.github.com/repos/akka/akka/languages","stargazers_url":"https://api.github.com/repos/akka/akka/stargazers","contributors_url":"https://api.github.com/repos/akka/akka/contributors","subscribers_url":"https://api.github.com/repos/akka/akka/subscribers","subscription_url":"https://api.github.com/repos/akka/akka/subscription","commits_url":"https://api.github.com/repos/akka/akka/commits{/sha}","git_commits_url":"https://api.github.com/repos/akka/akka/git/commits{/sha}","comments_url":"https://api.github.com/repos/akka/akka/comments{/number}","issue_comment_url":"https://api.github.com/repos/akka/akka/issues/comments{/number}","contents_url":"https://api.github.com/repos/akka/akka/contents/{+path}","compare_url":"https://api.github.com/repos/akka/akka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akka/akka/merges","archive_url":"https://api.github.com/repos/akka/akka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akka/akka/downloads","issues_url":"https://api.github.com/repos/akka/akka/issues{/number}","pulls_url":"https://api.github.com/repos/akka/akka/pulls{/number}","milestones_url":"https://api.github.com/repos/akka/akka/milestones{/number}","notifications_url":"https://api.github.com/repos/akka/akka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akka/akka/labels{/name}","releases_url":"https://api.github.com/repos/akka/akka/releases{/id}","created_at":"2009-02-16T12:51:54Z","updated_at":"2015-08-11T05:34:11Z","pushed_at":"2015-08-11T15:49:14Z","git_url":"git://github.com/akka/akka.git","ssh_url":"git@github.com:akka/akka.git","clone_url":"https://github.com/akka/akka.git","svn_url":"https://github.com/akka/akka","homepage":"http://akka.io","size":266818,"stargazers_count":4307,"watchers_count":4307,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1259,"mirror_url":null,"open_issues_count":736,"forks":1259,"open_issues":736,"watchers":4307,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akka/akka/pulls/17624"},"html":{"href":"https://github.com/akka/akka/pull/17624"},"issue":{"href":"https://api.github.com/repos/akka/akka/issues/17624"},"comments":{"href":"https://api.github.com/repos/akka/akka/issues/17624/comments"},"review_comments":{"href":"https://api.github.com/repos/akka/akka/pulls/17624/comments"},"review_comment":{"href":"https://api.github.com/repos/akka/akka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akka/akka/pulls/17624/commits"},"statuses":{"href":"https://api.github.com/repos/akka/akka/statuses/5cf35938d0ec09130fe840752fadc124b2810cf6"}}}}