You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by bi...@apache.org on 2014/07/17 02:24:49 UTC
svn commit: r1611224 -
/incubator/slider/site/trunk/content/developing/functional_tests.md
Author: billie
Date: Thu Jul 17 00:24:49 2014
New Revision: 1611224
URL: http://svn.apache.org/r1611224
Log:
SLIDER-241 update instructions for running functional tests
Modified:
incubator/slider/site/trunk/content/developing/functional_tests.md
Modified: incubator/slider/site/trunk/content/developing/functional_tests.md
URL: http://svn.apache.org/viewvc/incubator/slider/site/trunk/content/developing/functional_tests.md?rev=1611224&r1=1611223&r2=1611224&view=diff
==============================================================================
--- incubator/slider/site/trunk/content/developing/functional_tests.md (original)
+++ incubator/slider/site/trunk/content/developing/functional_tests.md Thu Jul 17 00:24:49 2014
@@ -31,10 +31,10 @@ For these to work you need
1. A YARN Cluster -secure or insecure
1. A `slider-client.xml` file configured to interact with the cluster
-1. Agent
-1. HBase tests: HBase `.tar.gz` uploaded to HDFS, and a local or remote accumulo conf
+1. Agent tests and Accumulo Agent tests: nothing additional
+1. HBase provider tests: HBase `.tar.gz` uploaded to HDFS, and a local or remote hbase conf
directory
-1. Accumulo Tests Accumulo `.tar.gz` uploaded to HDFS, and a local or remote accumulo conf
+1. Accumulo provider tests: Accumulo `.tar.gz` uploaded to HDFS, and a local or remote accumulo conf
directory
## Configuration of functional tests
@@ -51,11 +51,11 @@ If it is not present, the tests will fai
The path to the configuration directory must be supplied in the property
`slider.conf.dir` which can be set on the command line
- mvn test -Dslider.conf.dir=src/test/configs/sandbox/slider
+ mvn clean verify -Dslider.conf.dir=src/test/clusters/sandbox/slider
It can also be set in the (optional) file `slider-funtest/build.properties`:
- slider.conf.dir=src/test/configs/sandbox/slider
+ slider.conf.dir=src/test/clusters/sandbox/slider
This file is loaded whenever a slider build or test run takes place
@@ -67,20 +67,11 @@ Accumulo tests, as well as a common set
## Disabling the functional tests entirely
All functional tests which require a live YARN cluster
-can be disabled through the property `slider.funtest.enabled`
-
- <property>
- <name>slider.funtest.enabled</name>
- <value>false</value>
- </property>
+are run during the integration-test phase. They are executed with the command
+`mvn verify`.
-There is a configuration do do exactly this in
-`src/test/configs/offline/slider`:
-
- slider.conf.dir=src/test/configs/offline/slider
-
-Tests which do not require a live YARN cluster will still run;
-these verify that the `bin/slider` script works.
+If you do not wish to run the functional tests, simply use the `mvn package` command
+and only those tests which do not require a live YARN cluster will run.
### Non-mandatory options
@@ -88,12 +79,6 @@ The following test options may be added
need to be changed
<property>
- <name>slider.test.zkhosts</name>
- <description>comma separated list of ZK hosts</description>
- <value>localhost</value>
- </property>
-
- <property>
<name>slider.test.thaw.wait.seconds</name>
<description>Time to wait in seconds for a thaw to result in a running AM</description>
<value>60000</value>
@@ -142,7 +127,7 @@ Agent tests are executed through the fol
```
cd slider-funtest
-mvn test -Dslider.conf.dir=../src/test/clusters/remote/slider -Dtest=TestAppsThroughAgent -DfailIfNoTests=false
+mvn verify -Dslider.conf.dir=../src/test/clusters/remote/slider -Dit.test=AppsThroughAgentIT -DfailIfNoTests=false
```
**Enable/Execute the tests**
@@ -167,31 +152,12 @@ E.g. adduser **testuser** -d /home/**tes
**HDFS Setup**
-Set up hdfs folders for slider and test user
+Set up hdfs folders for test user
* su hdfs
-* hdfs dfs -mkdir /slider
-* hdfs dfs -chown testuser:hdfs /slider
* hdfs dfs -mkdir /user/testuser
* hdfs dfs -chown testuser:hdfs /user/testuser
-Load up agent package and config
-
-* su **testuser**
-* hdfs dfs -mkdir /slider/agent
-* hdfs dfs -mkdir /slider/agent/conf
-* hdfs dfs -copyFromLocal SLIDER_INSTALL_LOC/agent/conf/agent.ini /slider/agent/conf
-
-Ensure correct host name is provided for the agent tarball.
-
- <property>
- <name>slider.test.agent.tar</name>
- <description>Path to the Agent Tar file in HDFS</description>
- <value>hdfs://NN_HOSTNAME:8020/slider/agent/slider-agent.tar.gz</value>
- </property>
-
-
-
### HBase Tests
The HBase tests can be enabled or disabled
@@ -213,7 +179,7 @@ Mandatory test parameters must be added
<property>
<name>slider.test.hbase.appconf</name>
<description>Path to the directory containing the HBase application config</description>
- <value>file://${user.dir}/src/test/configs/sandbox/hbase</value>
+ <value>file://${user.dir}/src/test/clusters/sandbox/hbase</value>
</property>
Optional parameters:
@@ -292,7 +258,7 @@ the tests appear to hang
### Validating the configuration
- mvn test -Dtest=TestBuildSetup
+ mvn clean verify -Dit.test=BuildSetupIT
### Using relative paths in test configurations
@@ -309,7 +275,7 @@ persistent HDFS cluster.
of the directory, and which can then be used to create an absolute path
from paths relative to the configuration dir:
- <property>
+ <property>
<name>slider.test.hbase.appconf</name>
<description>Path to the directory containing the HBase application config</description>
<value>file://${slider.test.conf.dir}/../hbase</value>
@@ -364,12 +330,24 @@ The functional tests all
1. In the root `slider` directory, build a complete Slider release
mvn install -DskipTests
+
1. Start the YARN cluster/set up proxies to connect to it, etc.
1. In the `slider-funtest` dir, run the tests
- mvn test
-
+ mvn clean verify
+
+Slider does not need `mvn install` to be run before executing the
+functional tests. In fact, this may interfere with the tests picking
+up the most recent changes to the code. However, if you want to run tests
+for an individual module instead of running all Slider tests at once, you
+will need to install first. Make sure to install from the top level Slider
+directory so that all code changes are included. To run all functional
+tests, simply run `mvn clean verify` at the top level.
+
+If you are testing an individual module, and you want to
+propagate changes in slider-core through to the funtest classes for
+testing, you must build/install all the slider packages from the root assembly.
A common mistake during development is to rebuild the `slider-core` JARs
then the `slider-funtest` tests without rebuilding the `slider-assembly`.
In this situation, the tests are in sync with the latest build of the code
@@ -377,11 +355,6 @@ In this situation, the tests are in sync
of a previous build of `slider-core.jar`. As a result, the fixes are not picked
up.
-#### To propagate changes in slider-core through to the funtest classes for
-testing, you must build/install all the slider packages from the root assembly.
-
- mvn clean install -DskipTests
-
## Limitations of slider-funtest
1. All tests run from a single client -workload can't scale