Skip to content

Commit

Permalink
[pom] bump specs2
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony L. Kerz authored and Tony L. Kerz committed Sep 29, 2015
1 parent 88522b5 commit 6e76f7c
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 11 deletions.
16 changes: 14 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<akka-testkit.version>2.3.6</akka-testkit.version>
<junit.version>4.11</junit.version>
<mockito.version>1.9.5</mockito.version>
<specs2.version>2.3.10</specs2.version>
<specs2.version>3.6.4-20150927082714-7cac887</specs2.version>

<!-- maven versions-->
<maven-antrun-plugin.version>1.7</maven-antrun-plugin.version>
Expand Down Expand Up @@ -234,7 +234,19 @@
</dependency>
<dependency>
<groupId>org.specs2</groupId>
<artifactId>specs2_2.11.0-RC3</artifactId>
<artifactId>specs2-core_2.11</artifactId>
<version>${specs2.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.specs2</groupId>
<artifactId>specs2-mock_2.11</artifactId>
<version>${specs2.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.specs2</groupId>
<artifactId>specs2-junit_2.11</artifactId>
<version>${specs2.version}</version>
<scope>test</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class JobSchedulerElectionSpec
persistenceStore.getTasks returns Map[String, Array[Byte]]()
persistenceStore.getJobs returns Iterator[BaseJob]()

doNothing().when(mesosDriver).start()
doNothing.when(mesosDriver).start()

port += 1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import org.joda.time.format.ISODateTimeFormat
import org.joda.time.{DateTime, DateTimeZone, Hours, Minutes}
import org.specs2.mock.Mockito
import org.specs2.mutable._
import MockJobUtils._

class JobSchedulerIntegrationTest extends SpecificationWithJUnit with Mockito {
import MockJobUtils._

"JobScheduler" should {
"A job creates a failed task and then a successful task from a synchronous job" in {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import org.apache.mesos.chronos.scheduler.state.PersistenceStore
import org.joda.time._
import org.specs2.mock._
import org.specs2.mutable._

import MockJobUtils._

class JobSchedulerSpec extends SpecificationWithJUnit with Mockito {
import MockJobUtils._

//TODO(FL): Write more specs for the REST framework.
"JobScheduler" should {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class MesosJobFrameworkSpec extends SpecificationWithJUnit with Mockito {

val tasks = mutable.Buffer[(String, BaseJob, Offer)]()
doReturn(tasks).when(mesosJobFramework).generateLaunchableTasks(any)
doNothing().when(mesosJobFramework).reconcile(any)
doNothing.when(mesosJobFramework).reconcile(any)

val offer: Offer = makeBasicOffer
mesosJobFramework.resourceOffers(mock[SchedulerDriver], Seq[Protos.Offer](offer).asJava)
Expand Down Expand Up @@ -99,7 +99,7 @@ class MesosJobFrameworkSpec extends SpecificationWithJUnit with Mockito {

val tasks = mutable.Buffer[(String, BaseJob, Offer)]()
doReturn(tasks).when(mesosJobFramework).generateLaunchableTasks(any)
doNothing().when(mesosJobFramework).reconcile(any)
doNothing.when(mesosJobFramework).reconcile(any)

val offer: Offer = makeBasicOffer
mesosJobFramework.resourceOffers(mock[SchedulerDriver], Seq[Protos.Offer](offer).asJava)
Expand Down Expand Up @@ -129,7 +129,7 @@ class MesosJobFrameworkSpec extends SpecificationWithJUnit with Mockito {

val tasks = mutable.Buffer[(String, BaseJob, Offer)]()
doReturn(tasks).when(mesosJobFramework).generateLaunchableTasks(any)
doNothing().when(mesosJobFramework).reconcile(any)
doNothing.when(mesosJobFramework).reconcile(any)

val offer: Offer = makeBasicOffer
mesosJobFramework.resourceOffers(mock[SchedulerDriver], Seq[Protos.Offer](offer).asJava)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import org.apache.mesos.SchedulerDriver
import org.apache.mesos.chronos.scheduler.config.SchedulerConfiguration
import org.specs2.mock.Mockito
import org.specs2.mutable._

import scala.concurrent.duration.FiniteDuration
import org.specs2.matcher.ThrownExpectations

class MesosOfferReviverActorSpec extends SpecificationWithJUnit with Mockito {
"MesosOfferReviverActor" should {
Expand Down Expand Up @@ -75,7 +75,7 @@ class MesosOfferReviverActorSpec extends SpecificationWithJUnit with Mockito {
}
}

trait context extends BeforeAfter with Mockito {
trait context extends BeforeAfter with Mockito with ThrownExpectations {
implicit var actorSystem: ActorSystem = _
var driverFactory: MesosDriverFactory = _
var conf: SchedulerConfiguration with HttpConf = _
Expand Down

0 comments on commit 6e76f7c

Please sign in to comment.