Make poll period and timeout configurable.
Make poll period short for integration testing.