Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Fix Intermittent failing test #10

Open
markglh opened this issue May 31, 2017 · 1 comment
Open

Fix Intermittent failing test #10

markglh opened this issue May 31, 2017 · 1 comment

Comments

@markglh
Copy link
Contributor

markglh commented May 31, 2017

Sometime (in Travis) the following test fails:

[info]   - When the response is a failed batch it should shutdown and stop processing *** FAILED ***
[info]     org.mockito.exceptions.verification.WantedButNotInvoked: Wanted but not invoked:
[info] worker.requestShutdown();
[info] -> at com.weightwatchers.reactive.kinesis.consumer.ConsumerProcessingManagerSpec$$anon$2.$anonfun$new$7(ConsumerProcessingManagerSpec.scala:162)
[info] 
[info] However, there was exactly 1 interaction with this mock:
[info] worker.getApplicationName();
[info] -> at com.weightwatchers.reactive.kinesis.consumer.ConsumerProcessingManager.<init>(ConsumerProcessingManager.scala:65)
[info]     at com.weightwatchers.reactive.kinesis.consumer.ConsumerProcessingManagerSpec$$anon$2.$anonfun$new$7(ConsumerProcessingManagerSpec.scala:162)
[info]     at com.weightwatchers.reactive.kinesis.consumer.ConsumerProcessingManagerSpec$$anon$2$$Lambda$2021/1019640917.apply(Unknown Source)
[info]     at org.scalatest.concurrent.Futures.whenReady(Futures.scala:677)
[info]     at org.scalatest.concurrent.Futures.whenReady$(Futures.scala:675)
[info]     at com.weightwatchers.reactive.kinesis.consumer.ConsumerProcessingManagerSpec.whenReady(ConsumerProcessingManagerSpec.scala:52)
[info]     at com.weightwatchers.reactive.kinesis.consumer.ConsumerProcessingManagerSpec$$anon$2.<init>(ConsumerProcessingManagerSpec.scala:156)
[info]     at com.weightwatchers.reactive.kinesis.consumer.ConsumerProcessingManagerSpec.$anonfun$new$6(ConsumerProcessingManagerSpec.scala:152)
[info]     at com.weightwatchers.reactive.kinesis.consumer.ConsumerProcessingManagerSpec$$Lambda$1999/696904565.apply(Unknown Source)
[info]     at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
[info]     at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
[info]     ...

https://travis-ci.org/WW-Digital/reactive-kinesis/jobs/237901638

markglh added a commit that referenced this issue Sep 7, 2017
agaro1121 pushed a commit that referenced this issue Sep 11, 2017
* Upgrading KPL/KCL libraries, replacing deprecated shutdown calls

* auto format from compile

* restructure the ProducerConf into its own file and spec

* further refactoring of Producer to use ProducerConf

* tests pass - ish

* improve test exception for manager

* Fix Intermittent failing test - #10

* refactored producer to remove pointless trait, updated readme and specs

* removed unused config

* fix scalafmt

* address potters comments

* address formatting issues

* added ConsumerConfig test plus missing consumer fields

* improved thread reference docs

* removed comment
@markglh markglh closed this as completed Oct 4, 2017
@markglh
Copy link
Contributor Author

markglh commented Dec 3, 2017

Reopening this, saw it again in travis:

[info]   - When the response is a failed batch it should shutdown and stop processing *** FAILED ***
[info]     org.mockito.exceptions.verification.WantedButNotInvoked: Wanted but not invoked:
[info] worker.startGracefulShutdown();
[info] -> at com.weightwatchers.reactive.kinesis.consumer.ConsumerProcessingManagerSpec$$anonfun$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$mcV$sp$5$$anon$2$$anonfun$5.apply(ConsumerProcessingManagerSpec.scala:163)
[info] 
[info] However, there was exactly 1 interaction with this mock:
[info] worker.getApplicationName();
[info] -> at com.weightwatchers.reactive.kinesis.consumer.ConsumerProcessingManager.<init>(ConsumerProcessingManager.scala:65)
[info]     at com.weightwatchers.reactive.kinesis.consumer.ConsumerProcessingManagerSpec$$anonfun$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$mcV$sp$5$$anon$2$$anonfun$5.apply(ConsumerProcessingManagerSpec.scala:163)
[info]     at com.weightwatchers.reactive.kinesis.consumer.ConsumerProcessingManagerSpec$$anonfun$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$mcV$sp$5$$anon$2$$anonfun$5.apply(ConsumerProcessingManagerSpec.scala:154)
[info]     at org.scalatest.concurrent.Futures$class.whenReady(Futures.scala:677)
[info]     at com.weightwatchers.reactive.kinesis.consumer.ConsumerProcessingManagerSpec.whenReady(ConsumerProcessingManagerSpec.scala:52)
[info]     at com.weightwatchers.reactive.kinesis.consumer.ConsumerProcessingManagerSpec$$anonfun$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$mcV$sp$5$$anon$2.<init>(ConsumerProcessingManagerSpec.scala:154)
[info]     at com.weightwatchers.reactive.kinesis.consumer.ConsumerProcessingManagerSpec$$anonfun$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$mcV$sp$5.apply(ConsumerProcessingManagerSpec.scala:152)
[info]     at com.weightwatchers.reactive.kinesis.consumer.ConsumerProcessingManagerSpec$$anonfun$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$mcV$sp$5.apply(ConsumerProcessingManagerSpec.scala:152)
[info]     at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85)
[info]     at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
[info]     at org.scalatest.Transformer.apply(Transformer.scala:22)

@markglh markglh reopened this Dec 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant