|
Akka/Scala example source code file (ClusterMetricsDisabledSpec.scala)
The ClusterMetricsDisabledSpec.scala Akka example source code/* * Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com> */ package akka.cluster import akka.remote.testkit.{ MultiNodeSpec, MultiNodeConfig } import com.typesafe.config.ConfigFactory import akka.testkit.LongRunningTest import akka.cluster.ClusterEvent._ object ClusterMetricsDisabledMultiJvmSpec extends MultiNodeConfig { val first = role("first") val second = role("second") commonConfig(ConfigFactory.parseString("akka.cluster.metrics.enabled = off") .withFallback(MultiNodeClusterSpec.clusterConfigWithFailureDetectorPuppet)) } class ClusterMetricsDisabledMultiJvmNode1 extends ClusterMetricsDisabledSpec class ClusterMetricsDisabledMultiJvmNode2 extends ClusterMetricsDisabledSpec abstract class ClusterMetricsDisabledSpec extends MultiNodeSpec(ClusterMetricsDisabledMultiJvmSpec) with MultiNodeClusterSpec { "Cluster metrics" must { "not collect metrics, not publish ClusterMetricsChanged, and not gossip metrics" taggedAs LongRunningTest in { awaitClusterUp(roles: _*) clusterView.clusterMetrics.size should be(0) cluster.subscribe(testActor, classOf[ClusterMetricsChanged]) expectMsgType[CurrentClusterState] expectNoMsg clusterView.clusterMetrics.size should be(0) enterBarrier("after") } } } Other Akka source code examplesHere is a short list of links related to this Akka ClusterMetricsDisabledSpec.scala source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.