[jira] [Updated] (SLING-3212) JUnit retry Rule, for integration tests mostly

2013-10-29 Thread Bertrand Delacretaz (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-3212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bertrand Delacretaz updated SLING-3212:
---

Affects Version/s: Commons Testing 2.0.14
Fix Version/s: Commons Testing 2.0.16

 JUnit retry Rule, for integration tests mostly
 --

 Key: SLING-3212
 URL: https://issues.apache.org/jira/browse/SLING-3212
 Project: Sling
  Issue Type: New Feature
  Components: Testing
Affects Versions: Commons Testing 2.0.14
Reporter: Bertrand Delacretaz
Assignee: Bertrand Delacretaz
Priority: Minor
 Fix For: Commons Testing 2.0.16

 Attachments: SLING-3212-proof-of-concept.patch


 Some of our integration tests have been randomly failing from time to time, 
 and with the move to Oak which has slightly different reaction times, 
 especially in JCR observation, this is a more obvious problem. 
 Those tests usually assume that changing things in Sling has immediate 
 effects, and this is not always the case, while uploading or changing scripts 
 or configurations for example. There might be slight delays which are not 
 problematic in real use, but can make such tests fail. Retrying the tests, 
 with a small configurable delay between retries, should take care of those 
 problems.
 I'll attach a prototype JUnit Rule that enables test retries by just 
 instantiating the Rule in the test and adding an @Rule annotation to methods 
 that need it.
 My current plan is to add this Rule to our commons/testing module, and we'll 
 also need to slightly rework our base test classes to make them usable in 
 JUnit4-style tests, which is required to use Rules.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Updated] (SLING-3212) JUnit retry Rule, for integration tests mostly

2013-10-28 Thread Bertrand Delacretaz (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-3212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bertrand Delacretaz updated SLING-3212:
---

Attachment: SLING-3212-proof-of-concept.patch

 JUnit retry Rule, for integration tests mostly
 --

 Key: SLING-3212
 URL: https://issues.apache.org/jira/browse/SLING-3212
 Project: Sling
  Issue Type: New Feature
  Components: Testing
Reporter: Bertrand Delacretaz
Assignee: Bertrand Delacretaz
Priority: Minor
 Attachments: SLING-3212-proof-of-concept.patch


 Some of our integration tests have been randomly failing from time to time, 
 and with the move to Oak which has slightly different reaction times, 
 especially in JCR observation, this is a more obvious problem. 
 Those tests usually assume that changing things in Sling has immediate 
 effects, and this is not always the case, while uploading or changing scripts 
 or configurations for example. There might be slight delays which are not 
 problematic in real use, but can make such tests fail. Retrying the tests, 
 with a small configurable delay between retries, should take care of those 
 problems.
 I'll attach a prototype JUnit Rule that enables test retries by just 
 instantiating the Rule in the test and adding an @Rule annotation to methods 
 that need it.
 My current plan is to add this Rule to our commons/testing module, and we'll 
 also need to slightly rework our base test classes to make them usable in 
 JUnit4-style tests, which is required to use Rules.



--
This message was sent by Atlassian JIRA
(v6.1#6144)