Skip to content

Commit

Permalink
Issue #5137 - Cleanup of WebAppContextTest
Browse files Browse the repository at this point in the history
+ Cleanup of test-servlet-spec webapp
+ Removing unused methods
+ Commented System.err.println moved to java.util.logging
+ General checkstyle cleanup (empty lines, spacing, etc)
+ Eliminate bogus WebApp LIB ordering tests.
+ No ClassLoader has a order guarantee.
+ Moving HttpSessionListenerTest contents to existing SessionListenerTest
+ Cleanup of SessionListenerTest with eye to resource cleanup
+ Removing ServletContextListenerTest as it duplicates tests
+ Restoring WebAppClassLoaderTest test method
+ `ordering()` is now `testClashingResource()` and properly
  tests assumptions when dealing with a ClassLoader.
  The old test assumed guaranteed order from a ClassLoader,
  which is not a feature of any Java ClassLoader.
  Especially so for URLClassLoader.
+ Restoring clashing resource test

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
  • Loading branch information
joakime committed Sep 22, 2020
1 parent 74e9371 commit a99a832
Show file tree
Hide file tree
Showing 12 changed files with 373 additions and 541 deletions.
7 changes: 7 additions & 0 deletions jetty-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-test-helper</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ public void testResources() throws Exception
}

@Test
public void ordering() throws Exception
public void testClashingResource() throws Exception
{
// The existence of a URLStreamHandler changes the behavior
assumeTrue(URLStreamHandlerUtil.getFactory() == null, "URLStreamHandler changes behavior, skip test");
Expand Down

This file was deleted.

Loading

0 comments on commit a99a832

Please sign in to comment.