blob: 1907f86dd431a675e7a710558ebc2eef611f40fe [file] [log] [blame]
.. # @@@ START COPYRIGHT @@@
.. #
.. # Licensed to the Apache Software Foundation (ASF) under one
.. # or more contributor license agreements. See the NOTICE file
.. # distributed with this work for additional information
.. # regarding copyright ownership. The ASF licenses this file
.. # to you under the Apache License, Version 2.0 (the
.. # "License"); you may not use this file except in compliance
.. # with the License. You may obtain a copy of the License at
.. #
.. # http://www.apache.org/licenses/LICENSE-2.0
.. #
.. # Unless required by applicable law or agreed to in writing,
.. # software distributed under the License is distributed on an
.. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
.. # KIND, either express or implied. See the License for the
.. # specific language governing permissions and limitations
.. # under the License.
.. #
# @@@ END COPYRIGHT @@@
=============================
Trafodion Phoenix Test README
=============================
The Trafodion Phoenix Test is based off of the
`Salesforce phoenix end2end test <https://github.com/forcedotcom/phoenix/tree/master/phoenix-core/src/test/java/com/salesforce/phoenix/end2end>`_
found in the phoenix-core. The tests are written for JUnit, the tests
are run by Maven, and the test reports are generated by the Maven Surefire
Plugin.
Running Tests
*************
* First, add the bin directory of Java JDK 1.7 and Python 2.7 to your PATH ::
export PATH=/<PATH_to_JAVA_JDK_1.7_Home>/bin:/<PATH_to_Python_2.7_Home>/bin:$PATH
* Next, set the proxy environment variables if needed for your environment ::
export http_proxy="http://someproxy.com:8088"
export https_proxy="$http_proxy"
export ftp_proxy="$http_proxy"
* Next, run ``phoenix_test.py`` to configure the Trafodion Phoenix test and run it.
**Example 1 - Running ALL Trafodion T4 Phoenix Tests** ::
./phoenix_test.py --target=<Trafodion_Instance>:<Trafodion_Port> \
--user=<Some_User> --pw=<Some_Password> --targettype=TR \
--javahome=<PATH_to_JAVA_JDK_1.7_Home> --jdbccp=<PATH_to_Trafodion_JDBC_T4_Driver>
**Example 2 - Running a specific Trafodion T4 Phoenix Tests** ::
./phoenix_test.py --target=<Trafodion_Instance>:<Trafodion_Port> \
--user=<Some_User> --pw=<Some_Password> --targettype=TR \
--javahome=<PATH_to_JAVA_JDK_1.7_Home> --jdbccp=<PATH_to_Trafodion_JDBC_T4_Driver> \
--tests=<List_of_Tests_seperated_by_comma_and_no_space>
**Example 3 - Running ALL Trafodion T2 Phoenix Tests**
* Make sure the Trafodion sqenv.sh file has been sourced into the environment
* Set environment variable LD_PRELOAD ::
export LD_PRELOAD=$JAVA_HOME/jre/lib/amd64/libjsig.so:$TRAF_HOME/export/lib${SQ_MBTYPE}/libseabasesig.so
* Run ``phoenix_test.py`` with the following options
* For Cloudera ::
./phoenix_test.py --target=<Trafodion_Instance>:<Trafodion_Port> \
--user=<Some_User> --pw=<Some_Password> --targettype=TR \
--javahome=<PATH_to_JAVA_JDK_1.7_Home> --jdbccp=<PATH_to_Trafodion_JDBC_T2_Driver> \
--jdbctype=T2 --hadoop=CDH
* For Hortonworks ::
./phoenix_test.py --target=<Trafodion_Instance>:<Trafodion_Port> \
--user=<Some_User> --pw=<Some_Password> --targettype=TR \
--javahome=<PATH_to_JAVA_JDK_1.7_Home> --jdbccp=<PATH_to_Trafodion_JDBC_T2_Driver> \
--jdbctype=T2 --hadoop=HDP
**Example 4 - Running a specific Trafodion T2 Phoenix Tests**
* Make sure the Trafodion sqenv.sh file has been sourced into the environment
* Set environment variable LD_PRELOAD ::
export LD_PRELOAD=$JAVA_HOME/jre/lib/amd64/libjsig.so:$TRAF_HOME/export/lib${SQ_MBTYPE}/libseabasesig.so
* Run ``phoenix_test.py`` with the following options
* For Cloudera ::
./phoenix_test.py --target=<Trafodion_Instance>:<Trafodion_Port> \
--user=<Some_User> --pw=<Some_Password> --targettype=TR \
--javahome=<PATH_to_JAVA_JDK_1.7_Home> --jdbccp=<PATH_to_Trafodion_JDBC_T2_Driver> \
--jdbctype=T2 --hadoop=CDH --tests=<List_of_Tests_seperated_by_comma_and_no_space>
* For Hortonworks ::
./phoenix_test.py --target=<Trafodion_Instance>:<Trafodion_Port> \
--user=<Some_User> --pw=<Some_Password> --targettype=TR \
--javahome=<PATH_to_JAVA_JDK_1.7_Home> --jdbccp=<PATH_to_Trafodion_JDBC_T2_Driver> \
--jdbctype=T2 --hadoop=HDP --tests=<List_of_Tests_seperated_by_comma_and_no_space>
About this README
*****************
This README is written using `reStructuredText <http://docutils.sourceforge.net/docs/user/rst/quickref.html>`_ format. Using this
format, the `Sphinx <http://sphinx-doc.org/index.html>`_ tool can be used to create documentation in HTML, PDF, and other formats.
Other Resources
***************
* `JUnit <http://junit.org/>`_
* `Maven <http://maven.apache.org/>`_
* `Maven Surefire Plugin <http://maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html>`_
* `How to Run JUnit Test with Maven <http://www.mkyong.com/maven/how-to-run-unit-test-with-maven/>`_