[testng] 90/355: Do not pass all ITestNGMethods into Invoker, use ITestContext#getAllTestMethods() instead
Eugene Zhukov
eugene-guest at moszumanska.debian.org
Tue Aug 18 10:19:51 UTC 2015
This is an automated email from the git hooks/post-receive script.
eugene-guest pushed a commit to annotated tag OpenBSD
in repository testng.
commit 54ddefaf3df3a23776869b4fb8f580440f3eddcb
Author: Vladislav Rassokhin <vladrassokhin at gmail.com>
Date: Sun Nov 23 01:04:01 2014 +0300
Do not pass all ITestNGMethods into Invoker, use ITestContext#getAllTestMethods() instead
---
src/main/java/org/testng/TestRunner.java | 2 --
src/main/java/org/testng/internal/IInvoker.java | 4 ----
src/main/java/org/testng/internal/Invoker.java | 8 ++------
src/main/java/org/testng/internal/TestMethodWorker.java | 7 -------
4 files changed, 2 insertions(+), 19 deletions(-)
diff --git a/src/main/java/org/testng/TestRunner.java b/src/main/java/org/testng/TestRunner.java
index 1f2936b..49daa5f 100644
--- a/src/main/java/org/testng/TestRunner.java
+++ b/src/main/java/org/testng/TestRunner.java
@@ -899,7 +899,6 @@ public class TestRunner
methodInstances.toArray(new IMethodInstance[methodInstances.size()]),
m_xmlTest.getSuite(),
m_xmlTest.getAllParameters(),
- m_allTestMethods,
m_groupMethods,
m_classMethodMap,
this);
@@ -938,7 +937,6 @@ public class TestRunner
findClasses(methodInstances, c),
m_xmlTest.getSuite(),
params,
- m_allTestMethods,
m_groupMethods,
m_classMethodMap,
this);
diff --git a/src/main/java/org/testng/internal/IInvoker.java b/src/main/java/org/testng/internal/IInvoker.java
index b4ab9d9..98cda2e 100755
--- a/src/main/java/org/testng/internal/IInvoker.java
+++ b/src/main/java/org/testng/internal/IInvoker.java
@@ -37,8 +37,6 @@ public interface IInvoker {
* Invoke the given method
*
* @param testMethod
- * @param allTestMethods The list of all the test methods
- * @param methodIndex The index of testMethod in the allTestMethods array
* @param suite
* @param parameters
* @param groupMethods
@@ -46,8 +44,6 @@ public interface IInvoker {
* @return a list containing the results of the test methods invocations
*/
public List<ITestResult> invokeTestMethods(ITestNGMethod testMethod,
- ITestNGMethod[] allTestMethods,
- int methodIndex,
XmlSuite suite,
Map<String, String> parameters,
ConfigurationGroupMethods groupMethods,
diff --git a/src/main/java/org/testng/internal/Invoker.java b/src/main/java/org/testng/internal/Invoker.java
index bb61b52..6207c42 100644
--- a/src/main/java/org/testng/internal/Invoker.java
+++ b/src/main/java/org/testng/internal/Invoker.java
@@ -1077,8 +1077,6 @@ public class Invoker implements IInvoker {
*/
@Override
public List<ITestResult> invokeTestMethods(ITestNGMethod testMethod,
- ITestNGMethod[] allTestMethods,
- int testMethodIndex,
XmlSuite suite,
Map<String, String> testParameters,
ConfigurationGroupMethods groupMethods,
@@ -1113,7 +1111,7 @@ public class Invoker implements IInvoker {
ExpectedExceptionsHolder expectedExceptionHolder =
MethodHelper.findExpectedExceptions(m_annotationFinder, testMethod.getMethod());
while(invocationCount-- > 0) {
- boolean okToProceed = checkDependencies(testMethod, allTestMethods);
+ boolean okToProceed = checkDependencies(testMethod, testContext.getAllTestMethods());
if (!okToProceed) {
//
@@ -1144,7 +1142,7 @@ public class Invoker implements IInvoker {
Map<String, String> parameters =
testMethod.findMethodParameters(testContext.getCurrentXmlTest());
if (testMethod.getThreadPoolSize() > 1 && testMethod.getInvocationCount() > 1) {
- return invokePooledTestMethods(testMethod, allTestMethods, suite,
+ return invokePooledTestMethods(testMethod, suite,
parameters, groupMethods, testContext);
}
//
@@ -1393,7 +1391,6 @@ public class Invoker implements IInvoker {
* Invokes a method that has a specified threadPoolSize.
*/
private List<ITestResult> invokePooledTestMethods(ITestNGMethod testMethod,
- ITestNGMethod[] allTestMethods,
XmlSuite suite,
Map<String, String> parameters,
ConfigurationGroupMethods groupMethods,
@@ -1416,7 +1413,6 @@ public class Invoker implements IInvoker {
mi,
suite,
parameters,
- allTestMethods,
testContext));
}
diff --git a/src/main/java/org/testng/internal/TestMethodWorker.java b/src/main/java/org/testng/internal/TestMethodWorker.java
index 100daf1..cb93beb 100644
--- a/src/main/java/org/testng/internal/TestMethodWorker.java
+++ b/src/main/java/org/testng/internal/TestMethodWorker.java
@@ -36,7 +36,6 @@ public class TestMethodWorker implements IWorker<ITestNGMethod> {
private final IInvoker m_invoker;
private final Map<String, String> m_parameters;
private final XmlSuite m_suite;
- private final ITestNGMethod[] m_allTestMethods;
private List<ITestResult> m_testResults = Lists.newArrayList();
private final ConfigurationGroupMethods m_groupMethods;
private final ClassMethodMap m_classMethodMap;
@@ -46,7 +45,6 @@ public class TestMethodWorker implements IWorker<ITestNGMethod> {
IMethodInstance[] testMethods,
XmlSuite suite,
Map<String, String> parameters,
- ITestNGMethod[] allTestMethods,
ConfigurationGroupMethods groupMethods,
ClassMethodMap classMethodMap,
ITestContext testContext)
@@ -55,7 +53,6 @@ public class TestMethodWorker implements IWorker<ITestNGMethod> {
m_methodInstances = testMethods;
m_suite = suite;
m_parameters = parameters;
- m_allTestMethods = allTestMethods;
m_groupMethods = groupMethods;
m_classMethodMap = classMethodMap;
m_testContext = testContext;
@@ -126,8 +123,6 @@ public class TestMethodWorker implements IWorker<ITestNGMethod> {
// more efficient)
List<ITestResult> testResults =
m_invoker.invokeTestMethods(tm,
- m_allTestMethods,
- indexOf(tm, m_allTestMethods),
m_suite,
m_parameters,
m_groupMethods,
@@ -288,14 +283,12 @@ class SingleTestMethodWorker extends TestMethodWorker {
MethodInstance testMethod,
XmlSuite suite,
Map<String, String> parameters,
- ITestNGMethod[] allTestMethods,
ITestContext testContext)
{
super(invoker,
new MethodInstance[] {testMethod},
suite,
parameters,
- allTestMethods,
EMPTY_GROUP_METHODS,
null,
testContext);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/testng.git
More information about the pkg-java-commits
mailing list