maven test run fails on OpenSuse
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
What steps does it take to reproduce the issue?
Run "mvn package" or "mvn test" on (OpenSuse Tumbleweed/Leap 15) linux systems.
-
When does this issue occur?
On systems where file "/etc/hosts" does not contain other entries than localhost. -
What happens?
Tests fail. In SystemConfig.java "null" is returned from
try {
return "https://" + InetAddress.getLocalHost().getCanonicalHostName();
} catch (UnknownHostException e) {
return null;
}
because InetAddress.getLocalHost() from java.net throws UnknowHostException. (getCanonicalHostName searches for name in /etc/hosts). This lets e.g.
job.add("includedInDataCatalog", Json.createObjectBuilder()
.add("@type", "DataCatalog")
.add("name", installationBrandName)
.add("url", SystemConfig.getDataverseSiteUrlStatic())
in DatasetVersion.java fail.
-
To whom does it occur (all users, curators, superusers)?
Users on OpenSuse systems trying to compile dataverse -
What did you expect to happen?
Test should pass
Which version of Dataverse are you using?
v5.14
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading SystemConfig.java, especially the hostname lookup that returns null, and DatasetVersion.java where getDataverseSiteUrlStatic() is used. Run mvn test or mvn package on an OpenSuse system whose /etc/hosts contains only localhost. Done means the affected tests pass without requiring additional host entries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100