Skip to content

Commit

Permalink
remove remote/distributed classes
Browse files Browse the repository at this point in the history
  • Loading branch information
missedone committed Jan 11, 2016
1 parent 527223e commit a6742ea
Show file tree
Hide file tree
Showing 43 changed files with 14 additions and 3,797 deletions.
8 changes: 0 additions & 8 deletions src/main/java/org/testng/CommandLineArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,6 @@ public class CommandLineArgs {
@Parameter(names = HOST, description = "The host", hidden = true)
public String host;

public static final String MASTER = "-master";
@Parameter(names = MASTER, description = "Host where the master is", hidden = true)
public String master;

public static final String SLAVE = "-slave";
@Parameter(names = SLAVE, description = "Host where the slave is", hidden = true)
public String slave;

public static final String METHODS = "-methods";
@Parameter(names = METHODS, description = "Comma separated of test methods",
splitter = CommaParameterSplitter.class)
Expand Down
74 changes: 13 additions & 61 deletions src/main/java/org/testng/TestNG.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
import org.testng.internal.thread.graph.SuiteWorkerFactory;
import org.testng.junit.JUnitTestFinder;
import org.testng.log4testng.Logger;
import org.testng.remote.SuiteDispatcher;
import org.testng.remote.SuiteSlave;
import org.testng.reporters.EmailableReporter;
import org.testng.reporters.EmailableReporter2;
import org.testng.reporters.FailedReporter;
Expand Down Expand Up @@ -153,9 +151,6 @@ public class TestNG {
private int m_status;
private boolean m_hasTests= false;

private String m_slavefileName = null;
private String m_masterfileName = null;

// Command line suite parameters
private int m_threadCount = -1;
private XmlSuite.ParallelMode m_parallelMode = null;
Expand Down Expand Up @@ -1049,31 +1044,7 @@ public void run() {
runExecutionListeners(true /* start */);

m_start = System.currentTimeMillis();

//
// Slave mode
//
if (m_slavefileName != null) {
SuiteSlave slave = new SuiteSlave( m_slavefileName, this );
slave.waitForSuites();
}

//
// Regular mode
//
else if (m_masterfileName == null) {
suiteRunners = runSuitesLocally();
}

//
// Master mode
//
else {
SuiteDispatcher dispatcher = new SuiteDispatcher(m_masterfileName);
suiteRunners = dispatcher.dispatch(getConfiguration(),
m_suites, getOutputDirectory(),
getTestListeners());
}
suiteRunners = runSuites();

m_end = System.currentTimeMillis();
runExecutionListeners(false /* finish */);
Expand All @@ -1091,8 +1062,17 @@ m_suites, getOutputDirectory(),
}
}

private void p(String string) {
System.out.println("[TestNG] " + string);
/**
* Run the test suites.
* <p>
* This method can be overridden by subclass. <br/>
* For example, DistributedTestNG to run in master/slave mode according to commandline args.
* </p>
* @return
* @since 6.9.11 when moving distributed/remote classes out into separate project
*/
protected List<ISuite> runSuites() {
return runSuitesLocally();
}

private void runSuiteAlterationListeners() {
Expand Down Expand Up @@ -1441,8 +1421,6 @@ protected void configure(CommandLineArgs cla) {
setXmlPathInJar(cla.xmlPathInJar);
setJUnit(cla.junit);
setMixed(cla.mixed);
setMaster(cla.master);
setSlave(cla.slave);
setSkipFailedInvocationCounts(cla.skipFailedInvocationCounts);
if (cla.parallelMode != null) {
setParallel(cla.parallelMode);
Expand Down Expand Up @@ -1578,8 +1556,6 @@ public void configure(Map cmdLineArgs) {
result.xmlPathInJar = (String) cmdLineArgs.get(CommandLineArgs.XML_PATH_IN_JAR);
result.junit = (Boolean) cmdLineArgs.get(CommandLineArgs.JUNIT);
result.mixed = (Boolean) cmdLineArgs.get(CommandLineArgs.MIXED);
result.master = (String) cmdLineArgs.get(CommandLineArgs.MASTER);
result.slave = (String) cmdLineArgs.get(CommandLineArgs.SLAVE);
result.skipFailedInvocationCounts = (Boolean) cmdLineArgs.get(
CommandLineArgs.SKIP_FAILED_INVOCATION_COUNTS);
String parallelMode = (String) cmdLineArgs.get(CommandLineArgs.PARALLEL);
Expand Down Expand Up @@ -1672,24 +1648,6 @@ private void addReporter(ReporterConfig reporterConfig) {
}
}

/**
* Specify if this run should be in Master-Slave mode as Master
*
* @param fileName remote.properties path
*/
public void setMaster(String fileName) {
m_masterfileName = fileName;
}

/**
* Specify if this run should be in Master-Slave mode as slave
*
* @param fileName remote.properties path
*/
public void setSlave(String fileName) {
m_slavefileName = fileName;
}

/**
* Specify if this run should be made in JUnit mode
*
Expand Down Expand Up @@ -1735,10 +1693,9 @@ protected static void validateCommandLineParameters(CommandLineArgs args) {
String testClasses = args.testClass;
List<String> testNgXml = args.suiteFiles;
String testJar = args.testJar;
String slave = args.slave;
List<String> methods = args.commandLineMethods;

if (testClasses == null && slave == null && testJar == null
if (testClasses == null && testJar == null
&& (testNgXml == null || testNgXml.isEmpty())
&& (methods == null || methods.isEmpty())) {
throw new ParameterException("You need to specify at least one testng.xml, one class"
Expand All @@ -1754,11 +1711,6 @@ protected static void validateCommandLineParameters(CommandLineArgs args) {
throw new ParameterException("Groups option should be used with testclass option");
}

if (args.slave != null && args.master != null) {
throw new ParameterException(CommandLineArgs.SLAVE + " can't be combined with "
+ CommandLineArgs.MASTER);
}

Boolean junit = args.junit;
Boolean mixed = args.mixed;
if (junit && mixed) {
Expand Down
64 changes: 0 additions & 64 deletions src/main/java/org/testng/internal/remote/SlavePool.java

This file was deleted.

This file was deleted.

35 changes: 0 additions & 35 deletions src/main/java/org/testng/remote/ConnectionInfo.java

This file was deleted.

17 changes: 0 additions & 17 deletions src/main/java/org/testng/remote/RemoteArgs.java

This file was deleted.

34 changes: 0 additions & 34 deletions src/main/java/org/testng/remote/RemoteSuiteWorker.java

This file was deleted.

Loading

0 comments on commit a6742ea

Please sign in to comment.