This is an automated email from the ASF dual-hosted git repository. thiagohp pushed a commit to branch javax in repository https://gitbox.apache.org/repos/asf/tapestry-5.git
The following commit(s) were added to refs/heads/javax by this push: new cacc3dfd1 TAP5-2796: Upgrade TestNG, commons-codec, ANTLR, HSQLDB, cacc3dfd1 is described below commit cacc3dfd1a23dcd8583f5bd5f7fb2c9531a2d9bf Author: Thiago H. de Paula Figueiredo <thi...@arsmachina.com.br> AuthorDate: Sat Oct 26 11:59:04 2024 -0300 TAP5-2796: Upgrade TestNG, commons-codec, ANTLR, HSQLDB, snakeyaml TAP5-2796: fixing some failures caused by upgrading TestNG --- build.gradle | 17 ++++++++++------- .../TapestryBeanValidationIntegrationTests.java | 4 ++-- tapestry-core/build.gradle | 2 +- .../apache/tapestry5/integration/app1/BlockTests.groovy | 8 ++++++-- .../services/assets/CompressionAnalyzerImplTests.groovy | 7 +++++-- tapestry-hibernate-core/build.gradle | 2 +- tapestry-hibernate/build.gradle | 2 +- .../integration/TapestryHibernateIntegrationTests.java | 2 +- tapestry-http/build.gradle | 2 +- tapestry-ioc/build.gradle | 2 +- .../jmx/integration/TapestryJmxIntegrationTests.java | 2 +- .../java/org/apache/tapestry5/test/ioc/TestBase.java | 2 +- 12 files changed, 31 insertions(+), 21 deletions(-) diff --git a/build.gradle b/build.gradle index 1d7b79bed..c2f52e09d 100755 --- a/build.gradle +++ b/build.gradle @@ -12,8 +12,8 @@ apply from: "sha256.gradle" project.ext.versions = [ jetty: "8.1.19.v20160209", tomcat: "7.0.70", - testng: "6.14.3", - easymock: "3.3.1", + testng: "7.5.1", + easymock: "5.4.0", servletapi: "3.0.1", spock: "2.3-groovy-3.0", hibernate: "5.4.32.Final", @@ -27,6 +27,9 @@ project.ext.versions = [ commonsLang: "3.17.0", commonsIo: "2.17.0", webdriverManager: "5.3.1" + antlrRuntime: "3.5.3", + hsqldb: "2.7.3", + snakeyaml: "2.3" ] def artifactSuffix = "" @@ -144,8 +147,8 @@ dependencies { // From tapestry-ioc: binaries "javax.inject:javax.inject:1" binaries "org.slf4j:slf4j-api:${versions.slf4j}" - binaries "commons-codec:commons-codec:1.5" - binaries "org.antlr:antlr-runtime:3.3", { transitive = false } + binaries "commons-codec:commons-codec:1.17.1" + binaries "org.antlr:antlr-runtime:${versions.antlrRuntime}", { transitive = false } } String jdkVersion = System.properties['java.version'] @@ -413,12 +416,12 @@ subprojects { "commons-codec:commons-codec:1.10", "commons-io:commons-io:${versions.commonsIo}", "commons-logging:commons-logging:1.1.3", - "hsqldb:hsqldb:2.2.8", - "org.antlr:antlr-runtime:3.5.2", + "org.hsqldb:hsqldb:2.7.3", + "org.antlr:antlr-runtime:${versions.antlrRuntime}", "org.apache.tomcat:dbcp:6.0.32", "org.hamcrest:hamcrest-core:1.3", "org.json:json:20140107", - "org.yaml:snakeyaml:1.8", + "org.yaml:snakeyaml:${versions.snakeyaml}", "xml-apis:xml-apis:1.4.01" } diff --git a/tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java b/tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java index f89eb9953..5d84b892f 100644 --- a/tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java +++ b/tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java @@ -1,4 +1,4 @@ -// Copyright 2009-2013 The Apache Software Foundation +// Copyright 2009-2024 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import org.openqa.selenium.By; import org.openqa.selenium.support.ui.ExpectedConditions; import org.testng.annotations.Test; -@Test(sequential = true, groups = "integration") +@Test(singleThreaded = true, groups = "integration") @TapestryTestConfiguration(webAppFolder = "src/test/webapp") public class TapestryBeanValidationIntegrationTests extends SeleniumTestCase { diff --git a/tapestry-core/build.gradle b/tapestry-core/build.gradle index 142197c01..2df085334 100644 --- a/tapestry-core/build.gradle +++ b/tapestry-core/build.gradle @@ -37,7 +37,7 @@ dependencies { testImplementation "org.apache.httpcomponents:httpclient:4.5.14" testRuntimeOnly project(':tapestry-spock') - testRuntimeOnly "org.hsqldb:hsqldb:1.8.0.10" + testRuntimeOnly "org.hsqldb:hsqldb:${versions.hsqldb}" testRuntimeOnly 'com.google.inject:guice:3.0' } diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/BlockTests.groovy b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/BlockTests.groovy index 0673c2e71..1540ea6a0 100644 --- a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/BlockTests.groovy +++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/BlockTests.groovy @@ -36,10 +36,14 @@ class BlockTests extends App1TestCase openLinks "Empty If Demo", "Hide" - assertEquals 0, getCssCount(".header-seperator") + assertEqualsLocal 0, getCssCount(".header-seperator") clickAndWait "link=Show" - assertEquals 1, getCssCount(".header-seperator") + assertEqualsLocal 1, getCssCount(".header-seperator") + } + + def assertEqualsLocal(int actual, int expected) { + org.testng.Assert.assertEquals((int) actual, (int) expected) } } diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/internal/services/assets/CompressionAnalyzerImplTests.groovy b/tapestry-core/src/test/groovy/org/apache/tapestry5/internal/services/assets/CompressionAnalyzerImplTests.groovy index bc6cfec8e..25bb4110e 100644 --- a/tapestry-core/src/test/groovy/org/apache/tapestry5/internal/services/assets/CompressionAnalyzerImplTests.groovy +++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/internal/services/assets/CompressionAnalyzerImplTests.groovy @@ -12,10 +12,9 @@ package org.apache.tapestry5.internal.services.assets -import org.testng.Assert import org.testng.annotations.Test -class CompressionAnalyzerImplTests extends Assert { +class CompressionAnalyzerImplTests { @Test void non_match_yields_true() { @@ -45,4 +44,8 @@ class CompressionAnalyzerImplTests extends Assert { assertEquals true, ca.isCompressable("image/svg") } + + def assertEquals(boolean actual, boolean expected) { + return org.testng.Assert.assertEquals((boolean) actual, (boolean) expected); + } } diff --git a/tapestry-hibernate-core/build.gradle b/tapestry-hibernate-core/build.gradle index f4cde3f0d..3e541327a 100644 --- a/tapestry-hibernate-core/build.gradle +++ b/tapestry-hibernate-core/build.gradle @@ -11,7 +11,7 @@ dependencies { testImplementation project(':tapestry-test') testImplementation "org.easymock:easymock:${versions.easymock}" testImplementation "org.testng:testng:${versions.testng}", { transitive = false } - testRuntimeOnly "org.hsqldb:hsqldb:2.2.8" + testRuntimeOnly "org.hsqldb:hsqldb:${versions.hsqldb}" } jar { diff --git a/tapestry-hibernate/build.gradle b/tapestry-hibernate/build.gradle index b607b4bb6..f13cdcde9 100644 --- a/tapestry-hibernate/build.gradle +++ b/tapestry-hibernate/build.gradle @@ -7,7 +7,7 @@ dependencies { testImplementation project(':tapestry-test') - testRuntimeOnly "org.hsqldb:hsqldb:2.2.8" + testRuntimeOnly "org.hsqldb:hsqldb:${versions.hsqldb}" } jar { diff --git a/tapestry-hibernate/src/test/java/org/apache/tapestry5/hibernate/web/integration/TapestryHibernateIntegrationTests.java b/tapestry-hibernate/src/test/java/org/apache/tapestry5/hibernate/web/integration/TapestryHibernateIntegrationTests.java index 40703329a..c281d6259 100644 --- a/tapestry-hibernate/src/test/java/org/apache/tapestry5/hibernate/web/integration/TapestryHibernateIntegrationTests.java +++ b/tapestry-hibernate/src/test/java/org/apache/tapestry5/hibernate/web/integration/TapestryHibernateIntegrationTests.java @@ -21,7 +21,7 @@ import org.apache.tapestry5.test.TapestryTestConfiguration; import org.example.app0.entities.User; import org.testng.annotations.Test; -@Test(sequential = true, groups = "integration") +@Test(singleThreaded = true, groups = "integration") @TapestryTestConfiguration(webAppFolder = "src/test/webapp") public class TapestryHibernateIntegrationTests extends SeleniumTestCase { diff --git a/tapestry-http/build.gradle b/tapestry-http/build.gradle index 355472dc9..be6b4cede 100644 --- a/tapestry-http/build.gradle +++ b/tapestry-http/build.gradle @@ -17,7 +17,7 @@ dependencies { implementation "commons-codec:commons-codec:1.10" implementation "commons-io:commons-io:${versions.commonsIo}" - testRuntimeOnly "org.hsqldb:hsqldb:1.8.0.10" + testRuntimeOnly "org.hsqldb:hsqldb:${versions.hsqldb}" testRuntimeOnly 'com.google.inject:guice:3.0' } diff --git a/tapestry-ioc/build.gradle b/tapestry-ioc/build.gradle index 151886d8f..df3f1d9ac 100644 --- a/tapestry-ioc/build.gradle +++ b/tapestry-ioc/build.gradle @@ -21,7 +21,7 @@ dependencies { testImplementation "org.apache.commons:commons-lang3:3.4" testImplementation "org.hibernate:hibernate-core:5.2.10.Final" - testRuntimeOnly "org.hsqldb:hsqldb:2.2.8" + testRuntimeOnly "org.hsqldb:hsqldb:${versions.hsqldb}" testImplementation "org.junit.jupiter:junit-jupiter:${versions.junitJupiter}" diff --git a/tapestry-jmx/src/test/java/org/apache/tapestry5/jmx/integration/TapestryJmxIntegrationTests.java b/tapestry-jmx/src/test/java/org/apache/tapestry5/jmx/integration/TapestryJmxIntegrationTests.java index 55e504d41..c6ba05f8a 100644 --- a/tapestry-jmx/src/test/java/org/apache/tapestry5/jmx/integration/TapestryJmxIntegrationTests.java +++ b/tapestry-jmx/src/test/java/org/apache/tapestry5/jmx/integration/TapestryJmxIntegrationTests.java @@ -16,7 +16,7 @@ package org.apache.tapestry5.jmx.integration; import org.apache.tapestry5.test.SeleniumTestCase; import org.testng.annotations.Test; -@Test(sequential = true, groups = "integration") +@Test(singleThreaded = true, groups = "integration") public class TapestryJmxIntegrationTests extends SeleniumTestCase { /** TAP5-978 */ diff --git a/tapestry-test/src/main/java/org/apache/tapestry5/test/ioc/TestBase.java b/tapestry-test/src/main/java/org/apache/tapestry5/test/ioc/TestBase.java index c9fcc7d38..404813a48 100644 --- a/tapestry-test/src/main/java/org/apache/tapestry5/test/ioc/TestBase.java +++ b/tapestry-test/src/main/java/org/apache/tapestry5/test/ioc/TestBase.java @@ -134,6 +134,6 @@ public class TestBase extends TestUtils @SuppressWarnings({"UnusedDeclaration"}) protected static <T> Capture<T> newCapture() { - return new Capture<T>(); + return Capture.newInstance(); } }