The com.twitter.server.TwitterServer to be started for testing.
Command line flags (e.g. "foo"->"bar" is translated into -foo=bar). See: com.twitter.app.Flag.
Extra command line arguments.
Once the server is started, wait for server warmup to be completed
com.google.inject.Stage used to create the server's injector. Since EmbeddedTwitterServer is used for testing, we default to Stage.DEVELOPMENT. This makes it possible to only mock objects that are used in a given test, at the expense of not checking that the entire object graph is valid. As such, you should always have at least one Stage.PRODUCTION test for your service (which eagerly creates all classes at startup)
Use a tunneled socks proxy for external service discovery/calls (useful for manually run external integration tests that connect to external services).
Headers to always send to the embedded server.
Toggle to not unwrap response content body to allow caller to stream response.
Enable verbose logging during test runs.
Disable all logging emitted from the test infrastructure.
Maximum seconds to wait for embedded server to start. If exceeded a com.twitter.inject.app.StartupTimeoutException is thrown.
NOTE: We avoid using slf4j-api info logging so that we can differentiate the underlying server logs from the testing framework logging without requiring a test logging configuration to be loaded.
NOTE: We avoid using slf4j-api info logging so that we can differentiate the underlying server logs from the testing framework logging without requiring a test logging configuration to be loaded.
- the string message to log
EmbeddedTwitterServer allows a com.twitter.server.TwitterServer serving http or thrift endpoints to be started locally (on ephemeral ports) and tested through it's http/thrift interfaces.
Note: All initialization fields are lazy to aid running multiple tests inside an IDE at the same time since IDEs typically "pre-construct" ALL the tests before running each one.