rocksdb/java
fyrz 9bec23c413 [RocksJava] Test-framework integration
Summary:
As we had the discussion some weeks ago. Java needs a test framework and should support code coverage analysis. This pull request includes:

    Move Tests from main method functionality to Junit4
    Move WriteBatchTest to test package
    Adjust the Makefile to run Junit4
    Download dependencies from Make (once if not-present)
    Adjustment of the rocksjni.pom to run coverage analysis using jacoco
    Javadoc excludes now tests
    Two bugfixes regarding GC cleanup which came up within the test runs

Make can be used as beforehand to build and run RocksJava. make test runs tests using the command-line version of Junit4.

Maven can be used to retrieve code coverage reports using mvn -f rocksjni.pom package. Code coverage reports can then be found as usual in the site folder.

Testing libraries available within Java

    Junit4 (incl. hamcrest-core dependency)
    AssertJ (providing fluent syntax for assertions, cglib dependency)
    Mockito to provide mocktests

Libraries as said before are not statically within this commit or filesystem instead they are downloaded using curl. Make checks if files are present, if so it will perform tests without downloading the libraries again.

Note: Libraries are only necessary to compile & run tests.

Next steps after merge:

    Get the maven build into travis-ci and coveralls.io
    Filling up the missing test spots (based on coverage data)

Test Plan:
make rocksdbjava
make jtest

Reviewers: yhchiang, ankgup87, adamretter

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D28209
2014-11-14 20:59:36 +01:00
..
crossbuild Fixed cross platform build after introducing Java-7 dependencies 2014-10-23 21:10:49 +02:00
org/rocksdb [RocksJava] Test-framework integration 2014-11-14 20:59:36 +01:00
rocksjni [RocksJava] Test-framework integration 2014-11-14 20:59:36 +01:00
HISTORY-JAVA.md Update HISTORY.md for RocksJava 2014-11-14 11:23:00 -08:00
jdb_bench.sh Cross platform fix for Java benchmark shell script. 2014-10-05 10:46:55 +02:00
Makefile [RocksJava] Test-framework integration 2014-11-14 20:59:36 +01:00
RELEASE.md update release readme 2014-10-06 08:24:51 -07:00
RocksDBColumnFamilySample.java [RocksJava] Sample and Default value 2014-11-12 19:49:13 +01:00
RocksDBSample.java [RocksJava] Column family support 2014-10-13 10:34:52 +02:00
rocksjni.pom [RocksJava] Test-framework integration 2014-11-14 20:59:36 +01:00