Skip to content

Commit

Permalink
LOGGING-185: fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SingingBush committed Sep 2, 2023
1 parent 2e0bd27 commit 653de37
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ under the License.
<build>
<!-- TODO spotbugs:check -->
<!-- TODO replace clirr:check with japicmp:cmp -->
<defaultGoal>clean package apache-rat:check japicmp:cmp javadoc:javadoc checkstyle:check</defaultGoal>
<defaultGoal>clean verify apache-rat:check japicmp:cmp javadoc:javadoc checkstyle:check</defaultGoal>
<plugins>

<!--
Expand All @@ -208,7 +208,7 @@ under the License.
<goal>test-jar</goal>
</goals>
<configuration>
<jarName>commons-logging</jarName>
<finalName>commons-logging</finalName>
</configuration>
</execution>

Expand All @@ -219,7 +219,7 @@ under the License.
<goal>jar</goal>
</goals>
<configuration>
<jarName>${project.artifactId}-api-${project.version}</jarName>
<finalName>${project.artifactId}-api-${project.version}</finalName>
<classifier>api</classifier>
<includes>
<include>org/apache/commons/logging/*.class</include>
Expand All @@ -244,7 +244,7 @@ under the License.
<goal>jar</goal>
</goals>
<configuration>
<jarName>${project.artifactId}-adapters-${project.version}</jarName>
<finalName>${project.artifactId}-adapters-${project.version}</finalName>
<classifier>adapters</classifier>
<includes>
<include>org/apache/commons/logging/impl/**.class</include>
Expand All @@ -269,7 +269,7 @@ under the License.
<goal>jar</goal>
</goals>
<configuration>
<jarName>${project.artifactId}-${project.version}</jarName>
<finalName>${project.artifactId}-${project.version}</finalName>
<classifier>full</classifier>
</configuration>
</execution>
Expand Down Expand Up @@ -402,8 +402,8 @@ under the License.
<logkit>${logkit:logkit:jar}</logkit>
<servlet-api>${javax.servlet:servlet-api:jar}</servlet-api>
<commons-logging>target/${project.build.finalName}.jar</commons-logging>
<commons-logging-api>target/${project.artifactId}-api-${project.version}.jar</commons-logging-api>
<commons-logging-adapters>target/${project.artifactId}-adapters-${project.version}.jar</commons-logging-adapters>
<commons-logging-api>target/${project.artifactId}-api-${project.version}-api.jar</commons-logging-api>
<commons-logging-adapters>target/${project.artifactId}-adapters-${project.version}-adapters.jar</commons-logging-adapters>
<testclasses>target/commons-logging-tests.jar</testclasses>
</systemPropertyVariables>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
*/
package org.apache.commons.logging.pathable;

import static org.junit.Assert.assertNotEquals;

import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -145,8 +143,9 @@ public void testPaths() throws Exception {
// (context, child, parent).
final ClassLoader systemLoader = ClassLoader.getSystemClassLoader();
assertNotNull("System classloader is null", systemLoader);
assertNotEquals("System classloader has unexpected type", PathableClassLoader.class.getName(),
systemLoader.getClass().getName());
assertFalse("System classloader has unexpected type",
PathableClassLoader.class.getName().equals(
systemLoader.getClass().getName()));

// junit classes should be visible; their classloader is not
// in the hierarchy of parent classloaders for this class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

package org.apache.commons.logging.security;

import static org.junit.Assert.assertNotEquals;

import java.io.PrintWriter;
import java.io.StringWriter;
import java.lang.reflect.Field;
Expand Down Expand Up @@ -127,8 +125,8 @@ public void testAllForbidden() {
final Object factoryTable = factoryField.get(null);
assertNotNull(factoryTable);
final String ftClassName = factoryTable.getClass().getName();
assertNotEquals("Custom hashtable unexpectedly used",
CustomHashtable.class.getName(), ftClassName);
assertFalse("Custom hashtable unexpectedly used",
CustomHashtable.class.getName().equals(ftClassName));

assertEquals(0, mySecurityManager.getUntrustedCodeCount());
} catch (final Throwable t) {
Expand Down

0 comments on commit 653de37

Please sign in to comment.