#3313 - Relaxing the timing of the consumer timeout and marking the test as timing sensitive.
This commit is contained in:
parent
dbe0ef0acd
commit
f049ea4892
1 changed files with 5 additions and 6 deletions
|
|
@ -47,21 +47,20 @@ class ConsumerIntegrationTest extends WordSpec with MustMatchers with NonSharedC
|
|||
camel.sendTo("direct:a1", msg = "some message") must be("received some message")
|
||||
}
|
||||
|
||||
"Consumer must time-out if consumer is slow" in {
|
||||
"Consumer must time-out if consumer is slow" taggedAs TimingTest in {
|
||||
val SHORT_TIMEOUT = 10 millis
|
||||
val LONG_WAIT = 200 millis
|
||||
val LONG_WAIT = 1 second
|
||||
|
||||
val ref = start(new Consumer {
|
||||
override def replyTimeout = SHORT_TIMEOUT
|
||||
|
||||
def endpointUri = "direct:a3"
|
||||
def receive = { case _ ⇒ { Thread.sleep(LONG_WAIT.toMillis); sender ! "done" } }
|
||||
}, name = "ignore-this-deadletter-timeout-consumer-reply")
|
||||
|
||||
val exception = intercept[CamelExecutionException] {
|
||||
intercept[CamelExecutionException] {
|
||||
camel.sendTo("direct:a3", msg = "some msg 3")
|
||||
}
|
||||
exception.getCause.getClass must be(classOf[TimeoutException])
|
||||
}.getCause.getClass must be(classOf[TimeoutException])
|
||||
|
||||
stop(ref)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue