This guide is for people interested in working on the Geode code itself. It assumes you have basic familiarity with using Geode and standard Java tools.
Building and Running Tests
Geode is built with gradle 2. 3. See Building and Running Geode from Source for basic See BUILDING.md in the Geode repository for instructions on how to build . We recommend you use jdk1.7.0_75.
Geode uses the standard gradle lifecycle. Execute this to build and run all tests:
./gradlew clean build
from source.
Geode Geode has quite a few tests, so this will take several hours. The tests are broken divided into the following categoriestypes:
- unit tests - run with
./gradlew test
- integration tests - run with
./gradlew integrationTest
- distributed integration tests - run with
./gradlew distributedTest
...
- acceptance tests - run with
./gradlew acceptanceTest
To run an individual test, run the test in your IDE or specify the sub-project and test type like so:
./gradlew -DtestType.single=testName [project:]testType --tests testName
For example:
./gradlew
-DintegrationTest.single=ArrayUtilsJUnitTest integrationTestintegrationTest --tests ArrayUtilsJUnitTest
To run a specific category of tests (eg: GfshTest) you can do so with:
./gradlew distributedTest -PtestCategory=org.apache.geode.test.junit.categories.GfshTest
Setting up your IDE
...
Eclipse
Invoking ./gradlew eclipse
will generate the project and classpath files for all subprojects. Import all projects into eclipse. Note: run gradle build
prior to importing the projects into Eclipse.
IntelliJ
Invoking /gradlew idea
will generate project files for IntelliJ. Import the resulting project filesIn order to build the project successfully in IntelliJ and run tests, it is recommended to enable → Preferences → Build, Execution, Deployment → Build Tools → Gradle → "Create separate module per source set". It is also recommended to enable "Use auto-import".