Skip to content

Commit ae5d784

Browse files
committed
fix tests
1 parent f311a2a commit ae5d784

5 files changed

Lines changed: 10 additions & 6 deletions

File tree

pom.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@
4646
<selenium.devtools.artifactId>selenium-devtools-v136</selenium.devtools.artifactId>
4747

4848
<!-- test dependencies -->
49-
<junit.version>5.13.0</junit.version>
49+
<junit.version>5.13.1</junit.version>
50+
<junit-launcher.version>1.13.1</junit-launcher.version>
5051
<jetty.version>9.4.57.v20241219</jetty.version>
5152
<quercus.version>4.0.66</quercus.version>
52-
<log4j.version>2.24.3</log4j.version>
53+
<log4j.version>2.25.0</log4j.version>
5354
<slf4j.version>2.0.17</slf4j.version>
5455
<commons-text.version>1.13.1</commons-text.version>
5556
<commons-fileupload.version>1.6.0</commons-fileupload.version>
@@ -1328,7 +1329,7 @@
13281329
<dependency>
13291330
<groupId>org.junit.platform</groupId>
13301331
<artifactId>junit-platform-launcher</artifactId>
1331-
<version>1.13.0</version>
1332+
<version>${junit-launcher.version}</version>
13321333
<scope>test</scope>
13331334
</dependency>
13341335
<dependency>

src/test/java/org/htmlunit/CodeStyleTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import org.junit.jupiter.api.Assertions;
4141
import org.junit.jupiter.api.BeforeAll;
4242
import org.junit.jupiter.api.BeforeEach;
43+
import org.junit.jupiter.api.RepeatedTest;
4344
import org.junit.jupiter.api.Test;
4445

4546
/**
@@ -926,6 +927,7 @@ private void testTests(final File dir) throws Exception {
926927
&& method.getAnnotation(AfterEach.class) == null
927928
&& method.getAnnotation(AfterAll.class) == null
928929
&& method.getAnnotation(Test.class) == null
930+
&& method.getAnnotation(RepeatedTest.class) == null
929931
&& method.getReturnType() == Void.TYPE
930932
&& method.getParameterTypes().length == 0) {
931933
final List<String> lines = FileUtils.readLines(file, SOURCE_ENCODING);

src/test/java/org/htmlunit/ErrorOutputChecker.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
import org.junit.jupiter.api.extension.AfterEachCallback;
2424
import org.junit.jupiter.api.extension.BeforeEachCallback;
2525
import org.junit.jupiter.api.extension.ExtensionContext;
26+
2627
/**
27-
* JUnit 4 {@link org.junit.Rule} verifying that nothing is printed to {@link System#err}
28+
* JUnit callback verifying that nothing is printed to {@link System#err}
2829
* during test execution. If this is the case, the rule generates a failure for
2930
* the unit test.
3031
*

src/test/java/org/htmlunit/ExternalTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ private static void assertVersion(final String groupId, final String artifactId,
268268

269269
// it is ok if the pom uses a more recent version
270270
if (!isVersionAfter(pomVersion, latestMavenCentralVersion)) {
271-
Assertions.assertEquals(/* groupId + ":" + artifactId, */ latestMavenCentralVersion, pomVersion);
271+
Assertions.assertEquals(latestMavenCentralVersion, pomVersion, groupId + ":" + artifactId);
272272
}
273273
}
274274
}

src/test/java/org/htmlunit/javascript/ThreadTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class ThreadTest {
3838
/**
3939
* @throws InterruptedException if the test fails
4040
*/
41-
public void testJavaScriptEngineInMultipleThreads() throws InterruptedException {
41+
private void testJavaScriptEngineInMultipleThreads() throws InterruptedException {
4242
final TestThread thread1 = new TestThread("thread1");
4343
final TestThread thread2 = new TestThread("thread2");
4444
final TestThread thread3 = new TestThread("thread3");

0 commit comments

Comments
 (0)