How to Run Unit Tests

Tajo supports two cluster mode: StandbyMode and OnDemandMode. All unit tests can also be performed in both modes. Tajo uses StandbyMode as a default cluster mode in unit tests. In order to perform the unit tests with the StandbyMode, you type as the following command:

$ mvn clean install -Dtajo.resource.manager=org.apache.tajo.master.rm.TajoWorkerResourceManager

Or you can perform unit tests in StandbyMode as follows because StandbyMode is default for unit tests.

$ mvn clean install

If you want to perform the unit tests with the OnDemandMode using Yarn as a cluster resource manager. you should give a JVM option to maven as follows:

$ mvn clean install -Dtajo.resource.manager=org.apache.tajo.master.rm.YarnTajoResourceManager


TestCatalog can perform unit tests for various catalog drivers. In order to specify the driver to be tested, add the following JVM options.

JVM Options: -Dtajo.catalog.connection.password=password -Dtajo.catalog.uri=jdbc:mysql://localhost:3306/tajo

Using HCatalogStore for integration unit tests

Tajo includes lots of query tests (call integration test) in order to verify the various query cases and the integrity of the results. The integration test uses one of catalog store driver, and in default, it uses DerbyStore. But, you can change the catalog store as follows:

mvn clean test -Phcatalog-0.12.0 

UnitTests (last edited 2014-03-19 01:16:56 by HyunsikChoi)