Skip to content

Commit 47c0908

Browse files
committed
moxy.asm.version vs asm.version release test
Signed-off-by: Maxim Nesen <[email protected]>
1 parent e50a049 commit 47c0908

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2253,7 +2253,7 @@
22532253
<jsonp.ri.version>1.1.7</jsonp.ri.version>
22542254
<jsonp.jaxrs.version>1.1.7</jsonp.jaxrs.version>
22552255
<moxy.version>5.0.0-B02</moxy.version>
2256-
<moxy.asm.version>9.7.0</moxy.asm.version> <!-- TODO: update and remove @Ignore from the MoxyAsmTest -->
2256+
<moxy.asm.version>9.7.1</moxy.asm.version>
22572257
<yasson.version>3.0.4</yasson.version>
22582258
<!-- END of Jakartified -->
22592259

tests/release-test/src/test/java/org/glassfish/jersey/test/artifacts/MoxyAsmTest.java

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
public class MoxyAsmTest {
2626
@Test
27-
@Ignore("Until moxy.asm 9.7.1 is released")
2827
public void testAsmInMoxy() throws Exception {
2928
String moxyPomFile = "../../media/moxy/pom.xml";
3029
Model moxyPom = MavenUtil.getModelFromFile(moxyPomFile);
@@ -33,21 +32,11 @@ public void testAsmInMoxy() throws Exception {
3332
.findFirst().get();
3433
Model projectPom = MavenUtil.getModelFromFile("../../pom.xml");
3534
final String asmVersion = projectPom.getProperties().getProperty("asm.version");
36-
final String moxyAsmVersion = findVersionInModel(moxyAsmDependency.getVersion(), projectPom);
35+
final String moxyAsmVersion = projectPom.getProperties().getProperty("moxy.asm.version");
3736

38-
final String lastTwo = moxyAsmVersion.substring(moxyAsmVersion.length() - 2);
39-
final String msg = "org.eclipse.persistence.asm version " + moxyAsmVersion
40-
+ " differs from asm version " + asmVersion + " in /media/moxy/pom.xml";
41-
Assert.assertEquals(msg, asmVersion + lastTwo, moxyAsmVersion);
37+
final String msg = "org.eclipse.persistence.asm (moxy.asm.version) version " + moxyAsmVersion
38+
+ " differs from asm version (asm.version) " + asmVersion + " in /media/moxy/pom.xml";
39+
Assert.assertEquals(msg, asmVersion, moxyAsmVersion);
4240
System.out.println("Found expected Moxy ASM version " + moxyAsmVersion);
4341
}
44-
45-
private static String findVersionInModel(String version, Model model) {
46-
if (version.startsWith("${")) {
47-
String _version = version.substring(2, version.length() - 1);
48-
return model.getProperties().getProperty(_version);
49-
} else {
50-
return version;
51-
}
52-
}
5342
}

0 commit comments

Comments
 (0)