Fix DynamicWebAppClusterTest

- Timeout of 1 second meant it was failing in apache jenkins
  sometimes, so remove the custom timeout and rely on the default.
- Also tidies code