RFR: 867: Your git version is: 2.30.0.284...., which is not a known ...

Jorn Vernee jvernee at openjdk.java.net
Fri Jan 15 20:41:57 UTC 2021


On Fri, 15 Jan 2021 18:38:51 GMT, Martin Buchholz <martin at openjdk.org> wrote:

>> LGTM.
>> 
>> If you don't mind, please also add this version string as a test case to GitVersionTest: https://github.com/openjdk/skara/blob/master/vcs/src/test/java/org/openjdk/skara/vcs/git/GitVersionTest.java#L46
>
> @JornVernee. I made an effort to add some tests.  Blind change below.
> 
> I tried and failed to run the test.  Installing junit5 made no difference.
> README.md wants junit5 5.6.2 but my reasonably up-to-date system has an older version.
> I tried `sh gradlew reproduce` but it wants docker installed, and I'm reluctant to do that.
> `make test` produces no output to explain why it apparently didn't even try to compile GitVersionTest.
> 
> diff --git a/vcs/src/test/java/org/openjdk/skara/vcs/git/GitVersionTest.java b/vcs/src/test/java/org/openjdk/skara/vcs/git/GitVersionTest.java
> index 8d9f7a58..92755fbd 100644
> --- a/vcs/src/test/java/org/openjdk/skara/vcs/git/GitVersionTest.java
> +++ b/vcs/src/test/java/org/openjdk/skara/vcs/git/GitVersionTest.java
> @@ -43,7 +43,10 @@ public class GitVersionTest {
>              arguments("git version 2.25.3", 2, 25, 3),
>              arguments("git version 2.26.1", 2, 26, 1),
>  
> -            arguments("git version 2.27.0.windows.1", 2, 27, 0)
> +            arguments("git version 2.27.0.windows.1", 2, 27, 0),
> +
> +            arguments("git version 2.30.0.284", 2, 30, 0),
> +            arguments("git version 2.30.0.284.cafebabe-yoyodyne", 2, 30, 0)
>          );
>      }
>  ```

With that patch GitVersionTest still passes on my machine, so adding that seems good to me.

---

FWIW, I'd expect gradle to fetch the right junit dependency for you. Skara is also used as a testing platform for bleeding edge Java tech, so that's why a recent version of junit is being used.

You should be able to run `./gradlew :vcs:test` to trigger that particular set of tests to run, and GitVersionTest should be one of the first that runs. When running all the tests it might abort early due to a failure.

Using IntelliJ's built-in junit test runner should also work if you're using IntelliJ.

Lastly, if you [enable GitHub actions for your fork](https://wiki.openjdk.java.net/display/SKARA/Testing#Testing-Configuringworkflowstorun) some automated testing will also occur when you update the PR (results show at the bottom of the PR's 'Conversation' tab).

-------------

PR: https://git.openjdk.java.net/skara/pull/984


More information about the skara-dev mailing list