You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by cs...@apache.org on 2022/02/02 10:23:16 UTC
[maven-indexer] branch master updated: [MINDEXER-134] Missed cleanup of test fixture
This is an automated email from the ASF dual-hosted git repository.
cstamas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-indexer.git
The following commit(s) were added to refs/heads/master by this push:
new 418b934 [MINDEXER-134] Missed cleanup of test fixture
418b934 is described below
commit 418b93498c0df6925c4e6142f7b115c3322b2e37
Author: Tamas Cservenak <ta...@cservenak.net>
AuthorDate: Wed Feb 2 11:22:48 2022 +0100
[MINDEXER-134] Missed cleanup of test fixture
---
.../index/updater/fixtures/ServerTestFixture.java | 20 +++-----------------
1 file changed, 3 insertions(+), 17 deletions(-)
diff --git a/indexer-core/src/test/java/org/apache/maven/index/updater/fixtures/ServerTestFixture.java b/indexer-core/src/test/java/org/apache/maven/index/updater/fixtures/ServerTestFixture.java
index af3c889..aca1c2d 100644
--- a/indexer-core/src/test/java/org/apache/maven/index/updater/fixtures/ServerTestFixture.java
+++ b/indexer-core/src/test/java/org/apache/maven/index/updater/fixtures/ServerTestFixture.java
@@ -27,24 +27,15 @@ import java.io.OutputStream;
import java.net.URISyntaxException;
import java.net.URL;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.checkerframework.checker.units.qual.A;
-import org.eclipse.jetty.security.Authenticator;
import org.eclipse.jetty.security.ConstraintMapping;
import org.eclipse.jetty.security.ConstraintSecurityHandler;
import org.eclipse.jetty.security.HashLoginService;
-import org.eclipse.jetty.security.SecurityHandler;
-import org.eclipse.jetty.security.ServerAuthException;
import org.eclipse.jetty.security.UserStore;
import org.eclipse.jetty.security.authentication.BasicAuthenticator;
-import org.eclipse.jetty.server.Authentication;
-import org.eclipse.jetty.server.Authentication.User;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.Server;
@@ -52,7 +43,6 @@ import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.handler.DefaultHandler;
import org.eclipse.jetty.server.handler.HandlerCollection;
import org.eclipse.jetty.server.session.SessionHandler;
-import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.util.security.Constraint;
import org.eclipse.jetty.util.security.Password;
import org.eclipse.jetty.webapp.WebAppContext;
@@ -145,7 +135,7 @@ public class ServerTestFixture
@Override
protected void doGet( final HttpServletRequest req, final HttpServletResponse resp )
- throws ServletException, IOException
+ throws IOException
{
String basePath = req.getServletPath();
String subPath = req.getRequestURI().substring( basePath.length() );
@@ -178,6 +168,7 @@ public class ServerTestFixture
}
catch ( InterruptedException e )
{
+ throw new RuntimeException( e );
}
out.write( buf, 0, read );
@@ -188,11 +179,6 @@ public class ServerTestFixture
}
}
- public int getPort()
- {
- return ((ServerConnector)server.getConnectors()[0]).getLocalPort();
- }
-
public static final class InfiniteRedirectionServlet
extends HttpServlet
{
@@ -202,7 +188,7 @@ public class ServerTestFixture
@Override
protected void doGet( final HttpServletRequest req, final HttpServletResponse resp )
- throws ServletException, IOException
+ throws IOException
{
String path = req.getServletPath();
String subPath = req.getRequestURI().substring( path.length() );