Skip to content

Fix Cobertura unit test #510

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

Merged
merged 1 commit into from
Oct 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CoberturaXmlWriter(
val file = new File(outputDir, "cobertura.xml")
IOUtils.writeToFile(
file,
"<?xml version=\"1.0\"?>\n<!DOCTYPE coverage SYSTEM \"http://cobertura.sourceforge.net/xml/coverage-04.dtd\">\n" +
"<?xml version=\"1.0\"?>\n<!DOCTYPE coverage SYSTEM \"https://cobertura.sourceforge.net/xml/coverage-04.dtd\">\n" +
new PrettyPrinter(120, 4).format(xml(coverage)),
sourceEncoding
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
<!DOCTYPE coverage SYSTEM "https://cobertura.sourceforge.net/xml/coverage-04.dtd">

<coverage line-rate="0.9" branch-rate="0.75" version="1.9" timestamp="1187350905008">
<sources>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class CoberturaXmlWriterTest extends FunSuite {
)
}

test("cobertura output validates".ignore) {
test("cobertura output validates") {

val dir = tempDir()

Expand Down Expand Up @@ -298,8 +298,6 @@ class CoberturaXmlWriterTest extends FunSuite {
writer.write(coverage)

val domFactory = DocumentBuilderFactory.newInstance()
// TODO set validating here is no longer working as of 2.13.10. Not fully sure why but I don't use
// cobertura, so if someone wants to fix this, please do. I'll move forward with this not to block the release.
domFactory.setValidating(true)
val builder = domFactory.newDocumentBuilder()
builder.setErrorHandler(new ErrorHandler() {
Expand Down