mockito version supporting jdk9 #23402

This commit is contained in:
Johan Andrén 2017-09-26 08:51:53 +02:00 committed by GitHub
parent 4a2b6b23e5
commit af5f84ddac
2 changed files with 5 additions and 7 deletions

View file

@ -6,21 +6,19 @@ package akka.camel.internal.component
import language.postfixOps import language.postfixOps
import org.scalatest.mock.MockitoSugar import org.scalatest.mock.MockitoSugar
import org.mockito.Matchers.any import org.mockito.ArgumentMatchers.any
import org.mockito.Mockito._ import org.mockito.Mockito._
import org.apache.camel.{ AsyncCallback, ProducerTemplate } import org.apache.camel.{ AsyncCallback, ProducerTemplate }
import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.atomic.AtomicBoolean
import scala.concurrent.duration._ import scala.concurrent.duration._
import java.lang.String
import akka.camel._ import akka.camel._
import internal.{ CamelExchangeAdapter, DefaultCamel } import internal.{ CamelExchangeAdapter, DefaultCamel }
import org.scalatest.{ BeforeAndAfterAll, BeforeAndAfterEach, Suite, WordSpecLike } import org.scalatest.{ BeforeAndAfterAll, BeforeAndAfterEach, Suite, WordSpecLike }
import akka.camel.TestSupport._ import akka.camel.TestSupport._
import java.util.concurrent.{ CountDownLatch, TimeoutException } import java.util.concurrent.{ CountDownLatch, TimeoutException }
import org.mockito.{ ArgumentMatcher, Mockito, Matchers MMatchers } import org.mockito.{ ArgumentMatcher, ArgumentMatchers, Mockito, Matchers MMatchers }
import org.scalatest.Matchers import org.scalatest.Matchers
import akka.actor.Status.Failure import akka.actor.Status.Failure
import com.typesafe.config.ConfigFactory import com.typesafe.config.ConfigFactory
@ -213,8 +211,8 @@ class ActorProducerTest extends TestKit(ActorSystem("ActorProducerTest")) with W
producer = given(outCapable = true, replyTimeout = 10 millis) producer = given(outCapable = true, replyTimeout = 10 millis)
producer.processExchangeAdapter(exchange, asyncCallback) producer.processExchangeAdapter(exchange, asyncCallback)
asyncCallback.awaitCalled(100 millis) asyncCallback.awaitCalled(100 millis)
verify(exchange).setFailure(MMatchers.argThat(new ArgumentMatcher[FailureResult] { verify(exchange).setFailure(ArgumentMatchers.argThat(new ArgumentMatcher[FailureResult] {
def matches(failure: AnyRef) = { def matches(failure: FailureResult) = {
failure.asInstanceOf[FailureResult].cause should be(anInstanceOf[TimeoutException]) failure.asInstanceOf[FailureResult].cause should be(anInstanceOf[TimeoutException])
true true
} }

View file

@ -86,7 +86,7 @@ object Dependencies {
val commonsCodec = "commons-codec" % "commons-codec" % "1.10" % "test" // ApacheV2 val commonsCodec = "commons-codec" % "commons-codec" % "1.10" % "test" // ApacheV2
val junit = "junit" % "junit" % junitVersion % "test" // Common Public License 1.0 val junit = "junit" % "junit" % junitVersion % "test" // Common Public License 1.0
val logback = "ch.qos.logback" % "logback-classic" % "1.2.3" % "test" // EPL 1.0 / LGPL 2.1 val logback = "ch.qos.logback" % "logback-classic" % "1.2.3" % "test" // EPL 1.0 / LGPL 2.1
val mockito = "org.mockito" % "mockito-all" % "1.10.19" % "test" // MIT val mockito = "org.mockito" % "mockito-core" % "2.7.16" % "test" // MIT
// changing the scalatest dependency must be reflected in akka-docs/rst/dev/multi-jvm-testing.rst // changing the scalatest dependency must be reflected in akka-docs/rst/dev/multi-jvm-testing.rst
val scalatest = Def.setting { "org.scalatest" %% "scalatest" % scalaTestVersion.value % "test" } // ApacheV2 val scalatest = Def.setting { "org.scalatest" %% "scalatest" % scalaTestVersion.value % "test" } // ApacheV2
val scalacheck = Def.setting { "org.scalacheck" %% "scalacheck" % scalaCheckVersion.value % "test" } // New BSD val scalacheck = Def.setting { "org.scalacheck" %% "scalacheck" % scalaCheckVersion.value % "test" } // New BSD