Skip to content

HIFIO Cassandra tests were failing if run twice in a row without a clean#2499

Closed
ssisk wants to merge 1 commit intoapache:masterfrom
ssisk:fix-cassandra-uts
Closed

HIFIO Cassandra tests were failing if run twice in a row without a clean#2499
ssisk wants to merge 1 commit intoapache:masterfrom
ssisk:fix-cassandra-uts

Conversation

@ssisk
Copy link
Contributor

@ssisk ssisk commented Apr 11, 2017

Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

  • Make sure the PR title is formatted like:
    [BEAM-<Jira issue #>] Description of pull request
  • Make sure tests pass via mvn clean verify. (Even better, enable
    Travis-CI on your fork and ensure the whole test matrix passes).
  • Replace <Jira issue #> in the title with the actual Jira issue
    number, if there is one.
  • If this contribution is large, please file an Apache
    Individual Contributor License Agreement.

The embedded cassandra tests work correctly the first time they are run after a mvn clean - on any test phase execution of the jdk1.8-tests directory after that (ie, any time you run this unit tests again), they will fail. Thus, this passes our "mvn clean verify" runs and is not breaking CI, but will likely break any devs running tests in this directory locally without clean-ing. (aka, me)

R @dhalperi
R @tgroh
...whoever gets to this first

@ssisk
Copy link
Contributor Author

ssisk commented Apr 11, 2017

The root cause here is that the embedded cassandra service is not entirely in-memory - it stores some files to disk (which get wiped out by mvn clean.)

So the unit tests should clean up the cassandra instance when it destroys the instance in the @afterclass (as we do in other embedded tests), but in this case they don't.

To verify that this works, I ran this command sequence:
mvn clean verify -pl sdks/java/io/hadoop/jdk1.8-tests/
mvn verify -pl sdks/java/io/hadoop/jdk1.8-tests/

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 70.193% when pulling e72b135 on ssisk:fix-cassandra-uts into 7587d29 on apache:master.

@asfbot
Copy link

asfbot commented Apr 11, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/9418/
--none--

@asfgit asfgit closed this in ccf247c Apr 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants