Skip to content

Commit

Permalink
Refactorings.
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeust committed Aug 3, 2011
1 parent c31cd07 commit 10a202a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/testng/TestRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ private void privateRun(XmlTest xmlTest) {
// Make sure we create a graph based on the intercepted methods, otherwise an interceptor
// removing methods would cause the graph never to terminate (because it would expect
// termination from methods that never get invoked).
DynamicGraph<ITestNGMethod> graph = computeAlternateTestList(intercept(m_allTestMethods));
DynamicGraph<ITestNGMethod> graph = createDynamicGraph(intercept(m_allTestMethods));
if (graph.getNodeCount() > 0) {
GraphThreadPoolExecutor<ITestNGMethod> executor =
new GraphThreadPoolExecutor<ITestNGMethod>(graph, this,
Expand Down Expand Up @@ -1271,7 +1271,7 @@ private boolean containsString(Map<String, String> regexps, String group) {
return false;
}

private DynamicGraph<ITestNGMethod> computeAlternateTestList(ITestNGMethod[] methods) {
private DynamicGraph<ITestNGMethod> createDynamicGraph(ITestNGMethod[] methods) {
DynamicGraph<ITestNGMethod> result = new DynamicGraph<ITestNGMethod>();
Map<String, ITestNGMethod> map = Maps.newHashMap();
ListMultiMap<String, ITestNGMethod> groups = Maps.newListMultiMap();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/testng/internal/BaseTestMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ protected String getSignature() {
result.append(p.getName());
}
result.append(")");
result.append("[" + getPriority() + ", " + m_instance + "]");
result.append("[pri:" + getPriority() + ", instance:" + m_instance + "]");

return result.toString();
}
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/org/testng/internal/Invoker.java
Original file line number Diff line number Diff line change
Expand Up @@ -1673,16 +1673,16 @@ private boolean haveBeenRunSuccessfully(ITestNGMethod testMethod, ITestNGMethod[
return true;
}

private boolean containsInstance(Set<ITestResult> failedresults, Object[] instances) {
for (ITestResult tr : failedresults) {
for (Object o : instances) {
if (o == tr.getInstance()) {
return true;
}
}
}
return false;
}
// private boolean containsInstance(Set<ITestResult> failedresults, Object[] instances) {
// for (ITestResult tr : failedresults) {
// for (Object o : instances) {
// if (o == tr.getInstance()) {
// return true;
// }
// }
// }
// return false;
// }

/**
* An exception was thrown by the test, determine if this method
Expand Down

0 comments on commit 10a202a

Please sign in to comment.