• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

TAMULib / IRIIIFService / 11354881561
49%
master: 86%

Build:
Build:
LAST BUILD BRANCH: refs/tags/v0.6.1
DEFAULT BRANCH: master
Ran 15 Oct 2024 09:47PM UTC
Jobs 1
Files 65
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Oct 2024 09:45PM UTC coverage: 82.097% (-0.006%) from 82.103%
11354881561

push

github

kaladay
Issue 150: Fix problems with escaping and update unit tests.

This primarily focuses solving the problems with Fedora but many of the changes are broader than Fedora such that they may impact DSpace.

The data from the client should throw an error if the data is not properly escaped.
The escaping must not happen here.
This reverts the changes from commit eda72b902.

Simplify the `getRdf()` design.
- Replace `logger.info()` wrapped inside of `logger.isDebugEnabled()` with the simpler `logger.debug()`.
- Extend the `NotFoundException` to add the exception to the message.
- Remove excessive logging.

The unit tests throw `org.apache.jena.riot.RiotException` errors to match what the server should be throwing when there is unencoded spaces.
It is unclear whether or not we should or should not convert this into a `RestClientException`.
This is left alone for further discussion.

The `encodeSpaces()` is entirely removed.
The project should not be encoding bad data.
Instead, bad data should throw an error, such as the `RiotException`.
The DSpace code will need to be reviewed for accuracy and regressions after this change.

Change `fetchImageInfo()` logic to handle `RestClientException` and return `NotFoundException`.

An observed potential problem is:
```java
    private String getResourceId(String url) throws URISyntaxException {
        try {
            id = resourceResolver.lookup(url);
        } catch (NotFoundException e) {
            id = resourceResolver.create(url);
        }
```
This logic will fail on `NotFoundException`.
While this may not be the case here, there are a lot of places that translate the actual errors into `NotFoundException` even when the error is something other than `NotFoundException`.
This could potentially result in an attempt to create data when it should not.
I have not verified this behavior.

Several of the unit test regarding Fedora are refactored.
There are now multiple tests for encoded, d... (continued)

11 of 16 new or added lines in 3 files covered. (68.75%)

1018 of 1240 relevant lines covered (82.1%)

0.82 hits per line

Jobs
ID Job ID Ran Files Coverage
1 11354881561.1 15 Oct 2024 09:47PM UTC 0
82.1
GitHub Action Run
Source Files on build 11354881561
Detailed source file information is not available for this build.
  • Back to Repo
  • 41731b8d on github
  • Prev Build on main (#9975273725)
  • Next Build on 150-add_encoding_unit_tests (#11369468663)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc