Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Modifying/Testing JGit? Error from testBadCleanFilter test?

Hi Roy,

I've got the same issue. You will be surprised if you rerun the tests a given number of times: This particular test passes and fails randomly.
This is a Flaky test. I remember finding other tests that for some reason are non-deterministic:

org.eclipse.jgit.api.CommitCommandTest#commitSubmoduleUpdate
org.eclipse.jgit.api.AddCommandTest#testBadCleanFilter
org.eclipse.jgit.api.AddCommandTest#testCleanFilterReturning12
org.eclipse.jgit.api.AddCommandTest#testBadCleanFilter2

I wonder if Hudson has disapproved any Gerrit review because of this randomness (which may not be so frequent but do exists).
I used "mvn clean install" and also "mvn test". I don't know if I'm missing something although I haven't find much information about testing JGit itself. If there are other additional steps, perhaps they should have been documented somewhere.

Regards,
Jeanderson Barros Cândido

2016-05-24 16:08 GMT-03:00 Roy Wood <roy.wood@xxxxxxxxx>:
I'm working on a patch for JGit, but before I bother you guys with it, I'd like to make sure I haven't broken anything.  I see that there are comprehensive tests in the source repo, so I presume that running them will give me a good indication of whether my changes are okay.

So, what's the best way to run the tests?  The contributor guide mentions getting set up with Eclipse and some required dependencies, but the wording suggests that is mostly aimed at EGit.  I'm hoping to be able to just build and test JGit from the command line with Maven.


As far as Maven goes, I seem to be able to run "mvn clean install" and things build fine.  It also looks like the unit tests are run as part of the Maven build.  If I run "mvn test" again though, I get an error (see output below).  If I run "mvn clean" and then "mvn test" the error disappears.  Is there a problem with the testBadCleanFilter test?


Failed tests:
  AddCommandTest.testBadCleanFilter:234 expected:<127> but was:<0>

Tests run: 3422, Failures: 1, Errors: 0, Skipped: 58

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] JGit - Parent ...................................... SUCCESS [  1.676 s]
[INFO] JGit - Core ........................................ SUCCESS [ 18.305 s]
[INFO] JGit - Ant Tasks ................................... SUCCESS [  1.362 s]
[INFO] JGit Archive Formats ............................... SUCCESS [  1.517 s]
[INFO] JGit - AWT User Interface .......................... SUCCESS [  2.052 s]
[INFO] JGit - Apache httpclient based HTTP support ........ SUCCESS [  1.494 s]
[INFO] JGit - HTTP Server ................................. SUCCESS [  1.934 s]
[INFO] JGit - JUnit Utility Classes ....................... SUCCESS [  1.845 s]
[INFO] JGit - JUnit Http Utility Classes .................. SUCCESS [  2.075 s]
[INFO] JGit - Large File Storage .......................... SUCCESS [  1.673 s]
[INFO] JGit - Large File Storage Server ................... SUCCESS [  1.660 s]
[INFO] JGit - Command Line Interface ...................... SUCCESS [  3.759 s]
[INFO] JGit - Core Tests .................................. FAILURE [01:21 min]
[INFO] JGit - Ant Tasks Tests ............................. SKIPPED
[INFO] JGit - HTTP Tests .................................. SKIPPED
[INFO] JGit - Command Line Interface Tests ................ SKIPPED
[INFO] JGit - Large File Storage Tests .................... SKIPPED
[INFO] JGit - LFS Server Tests ............................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:01 min
[INFO] Finished at: 2016-05-24T15:04:58-04:00
[INFO] Final Memory: 42M/1441M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project org.eclipse.jgit.test: There are test failures.

_______________________________________________
jgit-dev mailing list
jgit-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jgit-dev


Back to the top