|
Ran
|
Jobs
1
|
Files
65
|
Run time
1min
|
Badge
README BADGES
|
push
github
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
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 11354881561.1 | 0 |
82.1 |
GitHub Action Run |