[ 
https://issues.apache.org/jira/browse/GEODE-7057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17101882#comment-17101882
 ] 

Scott Babcock commented on GEODE-7057:
--------------------------------------

[JUnit Foundation|https://github.com/Nordstrom/JUnit-Foundation] global timeout 
management enables you to establish a project-wide timeout that will terminate 
any test that runs longer than the specified interval. This feature leverages 
the implementation of the standard {{timeout}} element of the Test annotation. 
You can override the global interval on individual tests by explicitly 
specifying a longer timeout interval, you can decline global timeout management 
on individual tests or entire classes, and you can use rule-based timeout 
management as well.

> 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
>            Priority: Major
>
> 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
(v8.3.4#803005)

Reply via email to