Skip to content

Commit

Permalink
Fixed: TESTNG-276: Thread safety problem in Reporter class
Browse files Browse the repository at this point in the history
Fixed: TESTNG-277: Make Reporter.getCurrentTestResult() public
  • Loading branch information
cbeust committed Oct 15, 2008
1 parent d04b2ae commit 6ca01b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
@@ -1,6 +1,8 @@
===========================================================================
5.8.1

Fixed: TESTNG-276: Thread safety problem in Reporter class
Fixed: TESTNG-277: Make Reporter.getCurrentTestResult() public
Fixed: Potential NPE in XmlTest#getVerbose (Ryan Morgan)
Fixed: EmailableReporter only displayed the first group for each test method
Fixed: time-outs were not working in <test> and <suite>
Expand Down
4 changes: 2 additions & 2 deletions src/main/org/testng/Reporter.java
Expand Up @@ -114,15 +114,15 @@ public static void log(String s, int level) {
}
}

private static ITestResult getCurrentTestResult() {
public static ITestResult getCurrentTestResult() {
return m_currentTestResult.get();
}

private static void ppp(String s) {
System.out.println("[Reporter] " + s);
}

public static List<String> getOutput(ITestResult tr) {
public static synchronized List<String> getOutput(ITestResult tr) {
List<String> result = new ArrayList<String>();
List<Integer> lines = m_methodOutputMap.get(tr);
if (lines != null) {
Expand Down
4 changes: 2 additions & 2 deletions test/testng-single.xml
Expand Up @@ -2,10 +2,10 @@

<suite name="SingleSuite" verbose="2" >

<test name="SingleTest">
<test enabled="true" name="SingleTest">
<classes>

<class name="test.tmp.A">
<class name="test.xml.TestTagTest">
</class>
<!--
<class name="test.timeout.TestTimeOutSampleTest"/>
Expand Down

0 comments on commit 6ca01b5

Please sign in to comment.