Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pom] bump specs2 #566

Merged
merged 1 commit into from
Apr 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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