Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests failing on master branch with fresh checkout #152

Open
paulmillar opened this issue Jan 30, 2024 · 0 comments
Open

Unit tests failing on master branch with fresh checkout #152

paulmillar opened this issue Jan 30, 2024 · 0 comments

Comments

@paulmillar
Copy link
Contributor

Running maven with the package target triggers building and running the unit-tests, with the following output:

07:29 $ git checkout master
Switched to branch 'master'
Your branch is up to date with 'upstream/master'.
✔ ~/git/ICAT-related/ids.server [master|✔] 
07:29 $ mvn clean package
[INFO] Scanning for projects...
[INFO] 
[INFO] ---------------------< org.icatproject:ids.server >---------------------
[INFO] Building IDS Server 2.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[...]
Results :

Tests in error: 
  TestICATGetter.testGetService:27 » IcatException_ Invalid URL: 

Tests run: 17, Failures: 0, Errors: 1, Skipped: 1

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  10.344 s
[INFO] Finished at: 2024-01-30T07:30:03+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project ids.server: There are test failures.
[...]

The failing test is testGetService

    @Test
    public void testGetService() throws Exception {
        ICAT icat = ICATGetter.getService(System.getProperty("serverUrl"));
        System.out.println(icat.getApiVersion());
    }

This looks more like a functional or integration test than a unit test.

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

No branches or pull requests

1 participant