Ryan McMahon created GEODE-7057:
-----------------------------------
Summary: Add Per Test Timeout To JUnit Tests
Key: GEODE-7057
URL: https://issues.apache.org/jira/browse/GEODE-7057
Project: Geode
Issue Type: Improvement
Components: tests
Reporter: Ryan McMahon
Currently if a test hangs in any of our Concourse test jobs (UnitTest*,
DistributedTest*, etc), the Concourse job timeout will be reached but without
any indication which test actually hung. It would be useful to explore if we
can add a global test timeout which would fail the hanging test before the
Concourse timeout is reached. This article has some suggestions on how to do
this:
[https://github.com/junit-team/junit4/wiki/timeout-for-tests]
One suggestion is to use a JUnit rule. We would definitely want to avoid the
need to add this annotation to every test class, but we might be able to get
away with getting decent coverage by adding it to the test base classes
(JUnit4DistributedTestCase, JUnit4CacheTestCase).
Another suggestion is use a third party library which provides a global timeout
like JUnit Foundation (link in above article).
Regardless of implementation, the goal would be to timeout the test that is
hanging and show the failure output in CI without hitting the Concourse job
timeout.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)