Skip to content

chore(#4884): upgrade qulice to 0.25.1 in integration tests#4910

Merged
yegor256 merged 2 commits into
objectionary:masterfrom
volodya-lombrozo:4884-qulice-upgrade
Mar 2, 2026
Merged

chore(#4884): upgrade qulice to 0.25.1 in integration tests#4910
yegor256 merged 2 commits into
objectionary:masterfrom
volodya-lombrozo:4884-qulice-upgrade

Conversation

@volodya-lombrozo

@volodya-lombrozo volodya-lombrozo commented Mar 1, 2026

Copy link
Copy Markdown
Member

This PR upgrades qulice to version 0.25.1 in integration tests.

Fixes #4884

Summary by CodeRabbit

  • Chores
    • Updated qulice-maven-plugin version in the main POM and removed explicit versions in some module profiles.
    • Removed an unused Jetty HTTP test dependency.
  • Tests
    • Standardized UTF-8 encoding across tests.
    • Added PMD suppression annotations to many tests to silence unit-test warnings.
    • Simplified test compilation/runtime classpath construction to reduce intermediate state.

Copilot AI review requested due to automatic review settings March 1, 2026 20:09
@github-actions github-actions Bot added the core label Mar 1, 2026
@coderabbitai

coderabbitai Bot commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e97cd55 and ad4e120.

📒 Files selected for processing (1)
  • eo-integration-tests/pom.xml
💤 Files with no reviewable changes (1)
  • eo-integration-tests/pom.xml

📝 Walkthrough

Walkthrough

Refactors test classpath construction in JarIT, adds PMD suppression annotations across many integration tests, standardizes UTF-8 in test file writes, tweaks ProxyIT locals/assertions, and synchronizes qulice-maven-plugin version declarations across root and module POMs.

Changes

Cohort / File(s) Summary
Runtime Classpath Refactoring
eo-integration-tests/src/test/java/integration/JarIT.java
Inlined runtime classpath construction in compile(...), removed intermediate variables, and updated all callers.
PMD Warning Suppressions
eo-integration-tests/src/test/java/integration/ReadmeSnippetsIT.java, eo-integration-tests/src/test/java/integration/SnippetIT.java, eo-integration-tests/src/test/java/integration/XmirIT.java, eo-integration-tests/src/test/java/org/eolang/maven/MjAssembleIT.java, eo-integration-tests/src/test/java/org/eolang/maven/MjResolveIT.java
Added @SuppressWarnings("PMD.UnitTestShouldIncludeAssert") (and similar) to multiple test methods to silence PMD unit-test assert warnings.
UTF-8 Encoding Standardization
eo-integration-tests/src/test/java/org/eolang/maven/MjLintIT.java, eo-integration-tests/src/test/java/org/eolang/maven/MjParseIT.java, eo-integration-tests/src/test/java/org/eolang/maven/MjPrintIT.java, eo-integration-tests/src/test/java/org/eolang/maven/MjRegisterIT.java, eo-integration-tests/src/test/java/org/eolang/maven/MjTranspileIT.java
Replaced platform-default getBytes() with getBytes(StandardCharsets.UTF_8) and added corresponding imports.
ProxyIT Test Refactoring
eo-integration-tests/src/test/java/org/eolang/maven/ProxyIT.java
Introduced explicit Requisite usage, replaced some var with concrete types, consolidated HTTP response assertions, and added PMD suppressions.
POM: Qulice Plugin Versioning
pom.xml, eo-maven-plugin/pom.xml, eo-parser/pom.xml, eo-runtime/pom.xml, eo-integration-tests/pom.xml
Bumped root qulice-maven-plugin to 0.25.1 and removed explicit qulice plugin versions in several module POM profiles; removed org.eclipse.jetty:jetty-http dependency from eo-integration-tests/pom.xml.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested reviewers

  • yegor256

Poem

🐇 I hopped through tests at dawn's first light,
Inlined the paths and set encodings right,
PMD quieted with a gentle thump,
POMs aligned — no more version jump,
A carrot for CI, and code that’s bright.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main objective: upgrading qulice to 0.25.1 in integration tests, which aligns with the primary changes across the codebase.
Linked Issues check ✅ Passed The PR successfully implements the qulice 0.25.1 upgrade across the codebase as requested in issue #4884, updating pom.xml files and adding necessary PMD suppressions and charset fixes.
Out of Scope Changes check ✅ Passed All changes directly support the qulice upgrade: pom.xml version updates, PMD suppression annotations for new warnings, UTF-8 charset fixes, and removal of unused Jetty dependencies are all in-scope.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

🚀 Performance Analysis

All benchmarks are within the acceptable range. No critical degradation detected (threshold is 100%). Please refer to the detailed report for more information.

Click to see the detailed report
Test Base Score PR Score Change % Change Unit Mode
benchmarks.XmirBench.xmirToEO 195.127 210.028 14.901 7.64% ms/op Average Time

⚠️ Performance loss: benchmarks.XmirBench.xmirToEO is slower by 14.901 ms/op (7.64%)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Maven build to use qulice-maven-plugin 0.25.1 and adjusts integration tests to comply with the stricter static-analysis rules triggered by the upgrade (notably PMD assertions/encodings and minor refactorings).

Changes:

  • Bump qulice-maven-plugin from 0.25.0 to 0.25.1 in the root qulice profile and remove redundant per-module version overrides.
  • Update integration tests to satisfy new Qulice/PMD checks (explicit UTF-8 in getBytes, additional @SuppressWarnings).
  • Refactor a few tests (e.g., proxy and jar integration tests) to match updated linting expectations.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pom.xml Upgrades Qulice plugin version to 0.25.1 in the qulice profile.
eo-runtime/pom.xml Removes module-level Qulice plugin version to rely on inherited configuration.
eo-parser/pom.xml Removes module-level Qulice plugin version to rely on inherited configuration.
eo-maven-plugin/pom.xml Removes module-level Qulice plugin version to rely on inherited configuration.
eo-integration-tests/src/test/java/org/eolang/maven/ProxyIT.java Refactors proxy test assertions and addresses PMD rules; introduces Requisite typing.
eo-integration-tests/src/test/java/org/eolang/maven/MjTranspileIT.java Adds PMD suppression; enforces explicit UTF-8 encoding.
eo-integration-tests/src/test/java/org/eolang/maven/MjResolveIT.java Adds PMD suppression annotations.
eo-integration-tests/src/test/java/org/eolang/maven/MjRegisterIT.java Adds PMD suppression; enforces explicit UTF-8 encoding; reformats suppression block.
eo-integration-tests/src/test/java/org/eolang/maven/MjPrintIT.java Adds PMD suppression; enforces explicit UTF-8 encoding.
eo-integration-tests/src/test/java/org/eolang/maven/MjParseIT.java Adds PMD suppression; enforces explicit UTF-8 encoding.
eo-integration-tests/src/test/java/org/eolang/maven/MjLintIT.java Adds PMD suppression; enforces explicit UTF-8 encoding in writes.
eo-integration-tests/src/test/java/org/eolang/maven/MjAssembleIT.java Adds PMD suppression annotations.
eo-integration-tests/src/test/java/integration/XmirIT.java Adds PMD suppression annotation.
eo-integration-tests/src/test/java/integration/SnippetIT.java Extends suppression list to include PMD assertion rule.
eo-integration-tests/src/test/java/integration/ReadmeSnippetsIT.java Adds PMD suppression annotation.
eo-integration-tests/src/test/java/integration/JarIT.java Adds PMD suppression and refactors runtime classpath construction.
Comments suppressed due to low confidence (1)

eo-integration-tests/src/test/java/org/eolang/maven/ProxyIT.java:81

  • The assertion message says the response body should contain "objectionary.com", but the matcher checks for "objectionary" and "sources". Please align the message with what is actually asserted (or adjust the matcher if the full domain is required).
        MatcherAssert.assertThat(
            "Response body should contain objectionary.com",
            HttpClient.newBuilder()
            .proxy(ProxySelector.of(new InetSocketAddress("localhost", this.port)))
            .followRedirects(HttpClient.Redirect.NORMAL)
            .build()
            .send(
                HttpRequest.newBuilder()
                    .uri(URI.create("https://objectionary.com/"))
                    .header("User-Agent", "test-client")
                    .GET()
                    .build(), HttpResponse.BodyHandlers.ofString()
            ).body(),
            Matchers.allOf(
                Matchers.containsString("objectionary"),
                Matchers.containsString("sources")
            )

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 65 to +77
@@ -72,15 +74,7 @@ void checksThatProxyIsWorking() throws IOException, InterruptedException {
.header("User-Agent", "test-client")
.GET()
.build(), HttpResponse.BodyHandlers.ofString()
);
MatcherAssert.assertThat(
"Proxy should return 200 OK for objectionary.com",
resp.statusCode(),
Matchers.equalTo(HttpStatus.OK_200)
);
MatcherAssert.assertThat(
"Response body should contain objectionary.com",
resp.body(),
).body(),

Copilot AI Mar 1, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checksThatProxyIsWorking() no longer verifies the HTTP status code, so the test could pass even if the proxy returns an error/redirect page that still contains the expected substrings. Consider keeping a separate assertion for statusCode() (e.g., equals 200) in addition to the body-content assertion.

Copilot uses AI. Check for mistakes.
Comment on lines +251 to +263
Paths.get(System.getProperty("user.home")).resolve(".m2")
.resolve("repository")
.resolve("org/eolang/eo-runtime")
.resolve(
System.getProperty("eo.version", Manifests.read("EO-Version"))
)
.resolve(
String.format(
"eo-runtime-%s.jar",
System.getProperty("eo.version", Manifests.read("EO-Version"))
)
)
.toString()

Copilot AI Mar 1, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compile() now recomputes the EO runtime version via System.getProperty("eo.version", Manifests.read("EO-Version")) multiple times when building the runtime JAR path. Storing the resolved version in a local variable once would improve readability and avoid repeated manifest reads/property lookups, ensuring the same version is used consistently throughout the path construction.

Copilot uses AI. Check for mistakes.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
eo-integration-tests/src/test/java/integration/JarIT.java (1)

251-264: Consider extracting the version to a local variable.

System.getProperty("eo.version", Manifests.read("EO-Version")) is evaluated twice (lines 255 and 260). While functionally correct, extracting it to a local variable would improve readability and follow DRY.

♻️ Suggested refactor
+        final String version = System.getProperty("eo.version", Manifests.read("EO-Version"));
         return String.join(
             File.pathSeparator,
             "test-0.0.0.jar",
             Paths.get(System.getProperty("user.home")).resolve(".m2")
-            .resolve("repository")
-            .resolve("org/eolang/eo-runtime")
-            .resolve(
-                System.getProperty("eo.version", Manifests.read("EO-Version"))
-            )
-            .resolve(
-                String.format(
-                    "eo-runtime-%s.jar",
-                    System.getProperty("eo.version", Manifests.read("EO-Version"))
-                )
-            )
-            .toString()
+                .resolve("repository")
+                .resolve("org/eolang/eo-runtime")
+                .resolve(version)
+                .resolve(String.format("eo-runtime-%s.jar", version))
+                .toString()
         );
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@eo-integration-tests/src/test/java/integration/JarIT.java` around lines 251 -
264, Extract the repeated System.getProperty("eo.version",
Manifests.read("EO-Version")) into a local variable (e.g., eoVersion) at the
start of the method in JarIT, then replace both occurrences in the
Paths.get(...) chain and the String.format("eo-runtime-%s.jar", ...) call with
that variable; this removes the duplicated call, improves readability, and keeps
behavior identical.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@eo-integration-tests/src/test/java/integration/JarIT.java`:
- Around line 251-264: Extract the repeated System.getProperty("eo.version",
Manifests.read("EO-Version")) into a local variable (e.g., eoVersion) at the
start of the method in JarIT, then replace both occurrences in the
Paths.get(...) chain and the String.format("eo-runtime-%s.jar", ...) call with
that variable; this removes the duplicated call, improves readability, and keeps
behavior identical.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d7c6aea and e97cd55.

📒 Files selected for processing (16)
  • eo-integration-tests/src/test/java/integration/JarIT.java
  • eo-integration-tests/src/test/java/integration/ReadmeSnippetsIT.java
  • eo-integration-tests/src/test/java/integration/SnippetIT.java
  • eo-integration-tests/src/test/java/integration/XmirIT.java
  • eo-integration-tests/src/test/java/org/eolang/maven/MjAssembleIT.java
  • eo-integration-tests/src/test/java/org/eolang/maven/MjLintIT.java
  • eo-integration-tests/src/test/java/org/eolang/maven/MjParseIT.java
  • eo-integration-tests/src/test/java/org/eolang/maven/MjPrintIT.java
  • eo-integration-tests/src/test/java/org/eolang/maven/MjRegisterIT.java
  • eo-integration-tests/src/test/java/org/eolang/maven/MjResolveIT.java
  • eo-integration-tests/src/test/java/org/eolang/maven/MjTranspileIT.java
  • eo-integration-tests/src/test/java/org/eolang/maven/ProxyIT.java
  • eo-maven-plugin/pom.xml
  • eo-parser/pom.xml
  • eo-runtime/pom.xml
  • pom.xml
💤 Files with no reviewable changes (3)
  • eo-maven-plugin/pom.xml
  • eo-runtime/pom.xml
  • eo-parser/pom.xml

@volodya-lombrozo

Copy link
Copy Markdown
Member Author

@yegor256 could you have a look, please?

@yegor256
yegor256 merged commit e5ff67c into objectionary:master Mar 2, 2026
26 checks passed
@0crat

0crat commented Mar 6, 2026

Copy link
Copy Markdown

@volodya-lombrozo Great work on your contribution! 🎉 You've earned +12 points (+16 base, -4 for code volume of 176 lines). Quality over speed keeps us moving forward! Your total score is now +397 — check your Zerocracy account for updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

qulice 0.25.1 Upgrade Causes Massive Changes in Codebase

4 participants