diff --git a/pom.xml b/pom.xml
index b901fe72d..2cab032af 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,12 +16,12 @@
${basedir}/src/main/resources/assets
- 1.7
- 2.11.2
- 2.11.2
+ 11
+ 2.11.12
+ 2.11.12
- 2.3.16
+ 2.4.12
3.1.2
0.6.7
3.2
@@ -36,20 +36,20 @@
7.8.0
- 2.3.16
- 4.11
- 1.9.5
- 3.6.4-20150927082714-7cac887
+ 2.4.12
+ 4.12
+ 2.0.2-beta
+ 3.8.6
- 1.7
- 2.5
- 3.1
- 2.9
- 2.4
- 2.3
- 2.14.1
- 3.1.0
+ 1.8
+ 3.1.0
+ 3.8.0
+ 3.1.0
+ 3.1.1
+ 3.2.1
+ 3.0.0-M3
+ 4.0.1
@@ -238,6 +238,26 @@
${specs2.version}
test
+
+ javax.xml.bind
+ jaxb-api
+ 2.2.11
+
+
+ com.sun.xml.bind
+ jaxb-core
+ 2.2.11
+
+
+ com.sun.xml.bind
+ jaxb-impl
+ 2.2.11
+
+
+ javax.activation
+ activation
+ 1.1.1
+
org.specs2
specs2-junit_2.11
diff --git a/src/main/scala/org/apache/mesos/chronos/scheduler/config/ZookeeperModule.scala b/src/main/scala/org/apache/mesos/chronos/scheduler/config/ZookeeperModule.scala
index db6b206e3..a9fbc5fc5 100644
--- a/src/main/scala/org/apache/mesos/chronos/scheduler/config/ZookeeperModule.scala
+++ b/src/main/scala/org/apache/mesos/chronos/scheduler/config/ZookeeperModule.scala
@@ -11,7 +11,6 @@ import mesosphere.mesos.util.FrameworkIdUtil
import org.apache.curator.framework.recipes.leader.LeaderLatch
import org.apache.curator.framework.{CuratorFramework, CuratorFrameworkFactory}
import org.apache.curator.retry.ExponentialBackoffRetry
-import org.apache.curator.utils.EnsurePath
import org.apache.mesos.state.{State, ZooKeeperState}
/**
@@ -72,8 +71,11 @@ class ZookeeperModule(val config: SchedulerConfiguration with HttpConf)
@Singleton
@Provides
def provideStore(zk: CuratorFramework, state: State): PersistenceStore = {
- val ensurePath: EnsurePath = new EnsurePath(config.zooKeeperStatePath)
- ensurePath.ensure(zk.getZookeeperClient)
+ if (zk.checkExists().forPath(config.zooKeeperStatePath) != null) {
+ zk.checkExists().creatingParentContainersIfNeeded()
+ } else {
+ zk.create().creatingParentContainersIfNeeded()
+ }
new MesosStatePersistenceStore(zk, config, state)
}
@@ -88,8 +90,11 @@ class ZookeeperModule(val config: SchedulerConfiguration with HttpConf)
@Singleton
@Provides
def provideLeaderLatch(curator: CuratorFramework): LeaderLatch = {
- val ensurePath: EnsurePath = new EnsurePath(config.zooKeeperCandidatePath)
- ensurePath.ensure(curator.getZookeeperClient)
+ if (curator.checkExists().forPath(config.zooKeeperCandidatePath) != null) {
+ curator.checkExists().creatingParentContainersIfNeeded()
+ } else {
+ curator.create().creatingParentContainersIfNeeded()
+ }
val id = "%s:%d".format(config.hostname(), config.httpPort())
new LeaderLatch(curator, config.zooKeeperCandidatePath, id)
diff --git a/src/test/scala/org/apache/mesos/chronos/scheduler/jobs/JobSchedulerElectionSpec.scala b/src/test/scala/org/apache/mesos/chronos/scheduler/jobs/JobSchedulerElectionSpec.scala
index f0c39a33f..3e17287e5 100644
--- a/src/test/scala/org/apache/mesos/chronos/scheduler/jobs/JobSchedulerElectionSpec.scala
+++ b/src/test/scala/org/apache/mesos/chronos/scheduler/jobs/JobSchedulerElectionSpec.scala
@@ -9,7 +9,7 @@ import org.apache.curator.framework.recipes.leader.LeaderLatch
import org.apache.curator.framework.{CuratorFramework, CuratorFrameworkFactory}
import org.apache.curator.retry.ExponentialBackoffRetry
import org.apache.curator.test.{InstanceSpec, TestingCluster}
-import org.apache.curator.utils.{CloseableUtils, EnsurePath}
+import org.apache.curator.utils.CloseableUtils
import org.joda.time.Period
import org.junit.Assert.{assertFalse, assertTrue}
import org.junit.Test
@@ -135,8 +135,11 @@ class JobSchedulerElectionSpec
jobsObserver = mock[JobsObserver.Observer]
)
- val ensurePath: EnsurePath = new EnsurePath(leaderPath)
- ensurePath.ensure(curator.getZookeeperClient)
+ if (curator.checkExists().forPath(leaderPath) != null) {
+ curator.checkExists().creatingParentContainersIfNeeded()
+ } else {
+ curator.create().creatingParentContainersIfNeeded()
+ }
(scheduler, curator, leaderLatch)
}
diff --git a/src/test/scala/org/apache/mesos/chronos/scheduler/mesos/MesosOfferReviverActorSpec.scala b/src/test/scala/org/apache/mesos/chronos/scheduler/mesos/MesosOfferReviverActorSpec.scala
index 2faa8d2d7..fbb3d2da1 100644
--- a/src/test/scala/org/apache/mesos/chronos/scheduler/mesos/MesosOfferReviverActorSpec.scala
+++ b/src/test/scala/org/apache/mesos/chronos/scheduler/mesos/MesosOfferReviverActorSpec.scala
@@ -2,15 +2,17 @@ package org.apache.mesos.chronos.scheduler.mesos
import akka.actor._
import akka.testkit.TestProbe
-import com.codahale.metrics.{ Counter, MetricRegistry }
+import com.codahale.metrics.{Counter, MetricRegistry}
import mesosphere.chaos.http.HttpConf
import mesosphere.mesos.util.FrameworkIdUtil
import org.apache.mesos.SchedulerDriver
import org.apache.mesos.chronos.scheduler.config.SchedulerConfiguration
+import org.specs2.matcher.ThrownExpectations
import org.specs2.mock.Mockito
import org.specs2.mutable._
-import scala.concurrent.duration.FiniteDuration
-import org.specs2.matcher.ThrownExpectations
+
+import scala.concurrent.Await
+import scala.concurrent.duration.{FiniteDuration, _}
class MesosOfferReviverActorSpec extends SpecificationWithJUnit with Mockito {
"MesosOfferReviverActor" should {
@@ -39,8 +41,8 @@ class MesosOfferReviverActorSpec extends SpecificationWithJUnit with Mockito {
probe.watch(actorRef)
probe.expectMsgAnyClassOf(classOf[Terminated])
- actorSystem.shutdown()
- actorSystem.awaitTermination()
+ actorSystem.terminate()
+ Await.result(actorSystem.whenTerminated, Duration.Inf)
there was one(reviveOffersCounter).inc()
}
@@ -98,8 +100,8 @@ trait context extends BeforeAfter with Mockito with ThrownExpectations {
}
def after = {
- actorSystem.shutdown()
- actorSystem.awaitTermination()
+ actorSystem.terminate()
+ Await.result(actorSystem.whenTerminated, Duration.Inf)
}
def startActor(props: Props = MesosOfferReviverActor.props(conf, driverFactory, metrics)): ActorRef = {