Add back Cluster JMX, see 2311
* Separate class * Simple test
This commit is contained in:
parent
ce9f530c32
commit
17f0ce9f89
3 changed files with 121 additions and 4 deletions
|
|
@ -13,6 +13,8 @@ import akka.actor.Address
|
|||
import java.util.concurrent.atomic.AtomicInteger
|
||||
import akka.remote.RemoteActorRefProvider
|
||||
import InternalClusterAction._
|
||||
import java.lang.management.ManagementFactory
|
||||
import javax.management.ObjectName
|
||||
|
||||
object ClusterSpec {
|
||||
val config = """
|
||||
|
|
@ -57,6 +59,13 @@ class ClusterSpec extends AkkaSpec(ClusterSpec.config) with ImplicitSender {
|
|||
cluster.selfAddress must be(selfAddress)
|
||||
}
|
||||
|
||||
"register jmx mbean" in {
|
||||
val name = new ObjectName("akka:type=Cluster")
|
||||
val info = ManagementFactory.getPlatformMBeanServer.getMBeanInfo(name)
|
||||
info.getAttributes.length must be > (0)
|
||||
info.getOperations.length must be > (0)
|
||||
}
|
||||
|
||||
"initially become singleton cluster when joining itself and reach convergence" in {
|
||||
cluster.isSingletonCluster must be(false) // auto-join = off
|
||||
cluster.join(selfAddress)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue