You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by fm...@apache.org on 2026/04/16 13:26:54 UTC
(camel) branch main updated: chore: fix version comparison test broken by version bump
This is an automated email from the ASF dual-hosted git repository.
fmariani pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 3001b7bdf5d1 chore: fix version comparison test broken by version bump
3001b7bdf5d1 is described below
commit 3001b7bdf5d14d643e773da6934bfcdc63a6878f
Author: Croway <fe...@gmail.com>
AuthorDate: Thu Apr 16 15:20:48 2026 +0200
chore: fix version comparison test broken by version bump
---
.../dsl/jbang/core/commands/mcp/DependencyCheckToolsTest.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/dsl/camel-jbang/camel-jbang-mcp/src/test/java/org/apache/camel/dsl/jbang/core/commands/mcp/DependencyCheckToolsTest.java b/dsl/camel-jbang/camel-jbang-mcp/src/test/java/org/apache/camel/dsl/jbang/core/commands/mcp/DependencyCheckToolsTest.java
index ac2de52a1769..5305b79a9a73 100644
--- a/dsl/camel-jbang/camel-jbang-mcp/src/test/java/org/apache/camel/dsl/jbang/core/commands/mcp/DependencyCheckToolsTest.java
+++ b/dsl/camel-jbang/camel-jbang-mcp/src/test/java/org/apache/camel/dsl/jbang/core/commands/mcp/DependencyCheckToolsTest.java
@@ -362,11 +362,12 @@ class DependencyCheckToolsTest {
@Test
void compareVersionsCorrectly() {
- assertThat(DependencyCheckTools.compareVersions("4.10.0", "4.19.0")).isNegative();
- assertThat(DependencyCheckTools.compareVersions("4.19.0", "4.19.0")).isZero();
- assertThat(DependencyCheckTools.compareVersions("4.19.0", "4.10.0")).isPositive();
- assertThat(DependencyCheckTools.compareVersions("3.20.0", "4.0.0")).isNegative();
- assertThat(DependencyCheckTools.compareVersions("4.20.0-SNAPSHOT", "4.19.0")).isZero();
+ // Use synthetic versions to avoid being mangled by automated version-bump scripts
+ assertThat(DependencyCheckTools.compareVersions("1.2.0", "1.10.0")).isNegative();
+ assertThat(DependencyCheckTools.compareVersions("1.10.0", "1.10.0")).isZero();
+ assertThat(DependencyCheckTools.compareVersions("1.10.0", "1.2.0")).isPositive();
+ assertThat(DependencyCheckTools.compareVersions("2.20.0", "3.0.0")).isNegative();
+ assertThat(DependencyCheckTools.compareVersions("1.5.0-SNAPSHOT", "1.5.0")).isZero();
}
// ---- POM sanitization ----