This is an automated email from the ASF dual-hosted git repository.
thiagohp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git
The following commit(s) were added to refs/heads/master by this push:
new 1e4812122 TAP5-2796: Upgrade TestNG, commons-codec, ANTLR, HSQLDB,
1e4812122 is described below
commit 1e481212257ea0b7b303ab1e6e991ad272d2018e
Author: Thiago H. de Paula Figueiredo <[email protected]>
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 | 19 +++++++++++--------
.../TapestryBeanValidationIntegrationTests.java | 4 ++--
tapestry-core/build.gradle | 2 +-
.../tapestry5/integration/app1/BlockTests.groovy | 8 ++++++--
.../assets/CompressionAnalyzerImplTests.groovy | 7 +++++--
tapestry-hibernate-core/build.gradle | 2 +-
tapestry-hibernate/build.gradle | 2 +-
.../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, 32 insertions(+), 22 deletions(-)
diff --git a/build.gradle b/build.gradle
index 0a9cc70e3..791ff055a 100755
--- a/build.gradle
+++ b/build.gradle
@@ -12,8 +12,8 @@ apply from: "sha256.gradle"
project.ext.versions = [
jetty: "11.0.16",
tomcat: "10.1.13",
- testng: "6.14.3",
- easymock: "3.3.1",
+ testng: "7.5.1",
+ easymock: "5.4.0",
servletapi: "5.0.0",
spock: "2.3-groovy-3.0",
hibernate: "5.4.32.Final", // Upgrade postponed due too many API changes
from 5 to 6
@@ -28,7 +28,10 @@ project.ext.versions = [
commonsIo: "2.17.0",
webdriverManager: "5.3.1",
injectApi: "2.0.1",
- annotationApi: "2.0.0"
+ annotationApi: "2.0.0",
+ antlrRuntime: "3.5.3",
+ hsqldb: "2.7.3",
+ snakeyaml: "2.3"
]
def artifactSuffix = "-jakarta"
@@ -146,8 +149,8 @@ dependencies {
// From tapestry-ioc:
binaries "jakarta.inject:jakarta.inject-api:${versions.injectApi}"
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']
@@ -414,12 +417,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 6eeb25659..328e1e9eb 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 59d4a7f67..96e4ed9bf 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 e9157bbd6..5a89ce604 100644
--- a/tapestry-ioc/build.gradle
+++ b/tapestry-ioc/build.gradle
@@ -19,7 +19,7 @@ dependencies {
testImplementation "commons-lang:commons-lang:2.6"
testImplementation
"org.apache.commons:commons-lang3:${versions.commonsLang}"
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();
}
}