From: Marcus Better <marcus@better.se>
Subject: use threadsafe collections in threaded tests
Bug: http://jira.opensymphony.com/browse/TESTNG-404

The ConfigurationGroupBothSampleTest modifies a non-threadsafe
collection within a test method that is invoked concurrently from two
threads. This can cause the test to fail.

---
 .../ConfigurationGroupBothSampleTest.java          |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/test/src/test/configuration/ConfigurationGroupBothSampleTest.java b/test/src/test/configuration/ConfigurationGroupBothSampleTest.java
index 1d4e4d5..b919565 100644
--- a/test/src/test/configuration/ConfigurationGroupBothSampleTest.java
+++ b/test/src/test/configuration/ConfigurationGroupBothSampleTest.java
@@ -1,6 +1,7 @@
 package test.configuration;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
 import org.testng.annotations.AfterGroups;
@@ -9,7 +10,7 @@ import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
 public class ConfigurationGroupBothSampleTest {
-  static List<Integer> m_list = new ArrayList<Integer>();
+  static List<Integer> m_list = Collections.synchronizedList(new ArrayList<Integer>());
   
   @BeforeGroups(groups={"twice"}, value={"twice"})
   public void a(){
-- 
tg: (6f1f2af..) features/threadsafe-collections-in-tests (depends on: master)
