-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LOGGING-185: fix integration tests #157
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @SingingBush
Thank you for your PR. Please see my comments. TY.
eac3836
to
653de37
Compare
@@ -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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That can't be right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this was odd, could be due to changing jarName to finalName in the pom. However, jarName is supposed to just be an alias for finalName so it shouldn't have changed anything. When building I did see the jars being built in that naming format:
target/commons-logging-1.3.0-SNAPSHOT-full.jar
target/commons-logging-1.3.0-SNAPSHOT.jar
target/commons-logging-1.3.0-SNAPSHOT-sources.jar
target/commons-logging-1.3.0-SNAPSHOT-tests.jar
target/commons-logging-1.3.0-SNAPSHOT-test-sources.jar
target/commons-logging-adapters-1.3.0-SNAPSHOT-adapters.jar
target/commons-logging-api-1.3.0-SNAPSHOT-api.jar
target/commons-logging-tests.jar
To confirm, I just tried swapping finalName back to jarName but can confirm that the classifier is still appended. It is usual for maven to put the classifier at the end of the filename before the extension.
Perhaps the better thing to do is simple allow maven to do the standard thing by not specifying a value for jarName or finalName in which case it'll just create:
target/commons-logging-1.3.0-SNAPSHOT-adapters.jar
target/commons-logging-1.3.0-SNAPSHOT-api.jar
However the test code itself is looking for the existence of commons-logging-adapters-1
on the classpath.
<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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That can't be right.
@@ -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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in junit 4 assertTrue is part of TestCase and is available when the tests are running. assertNotEquals was coming from a static import of org.junit.Assert
which was getting a class not fund exception. It could be changed to assertNotSame as that's also part of the TestCase class.
@@ -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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
Note: the build is still broken. |
This is odd and frustrating, I've been able to run this locally on both Java 8 and 11 |
@SingingBush |
946ca24
to
ad79cd4
Compare
@SingingBush |
Closing: Fixed by #180 |
No description provided.