Set com.twitter.finagle.netty3.numWorkers on test run

92 views
Skip to first unread message

gpn...@gmail.com

unread,
Mar 14, 2017, 3:30:20 PM3/14/17
to finatra-users
I looked for the answer to this question in the docs, videos, and via Google. Forgive me if I have overlooked the answer somewhere.

I can set the netty3 and netty4 workers when running my Finatra server via

sbt "run -com.twitter.finagle.netty3.numWorkers=1 -com.twitter.finagle.netty4.numWorkers=1"

How do I set these values when running my Finatra FeatureTest tests? I tried:

sbt "test -com.twitter.finagle.netty3.numWorkers=1 -com.twitter.finagle.netty4.numWorkers=1"

which fails with:

[error] No valid parser available.

I tried using System.setProperty as well without success (I've found out why this doesn't work in another thread somewhere).

I will need these values set when the tests run during assembly as well.

Thanks in advance.

Christopher Coco

unread,
Mar 14, 2017, 6:17:50 PM3/14/17
to gpn...@gmail.com, finatra-users
This is more an sbt question but if you fork in test then you won’t be able to pass params this manner to the forked process. I spent a long time on this as well but the only sane solution I found was setting these in the sbt file as part of the javaOptions in Test.

See the sbt documentation on Forking in tests: http://www.scala-sbt.org/0.13/docs/Forking.html

This should work if you don’t fork in test.

Hope that helps.

Thanks,
-c


--
You received this message because you are subscribed to the Google Groups "finatra-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to finatra-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

gpn...@gmail.com

unread,
Mar 15, 2017, 11:38:58 AM3/15/17
to finatra-users, gpn...@gmail.com
I am currently not forking in test but will look into the option. Thanks for taking the time to answer and point me in the right direction. I haven't solved it yet but will continue looking into the SBT side of things.

Thanks again,
- Adam

Reply all
Reply to author
Forward
0 new messages