Skip to content

Commit df54bd1

Browse files
committed
fix the test
1 parent 0099b31 commit df54bd1

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

opengrok-web/src/test/java/org/opengrok/web/api/v1/controller/SuggesterControllerProjectsDisabledTest.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@
2323
*/
2424
package org.opengrok.web.api.v1.controller;
2525

26-
import jakarta.ws.rs.core.Application;
26+
import org.glassfish.jersey.servlet.ServletContainer;
27+
import org.glassfish.jersey.test.DeploymentContext;
28+
import org.glassfish.jersey.test.ServletDeploymentContext;
29+
import org.glassfish.jersey.test.grizzly.GrizzlyWebTestContainerFactory;
30+
import org.glassfish.jersey.test.spi.TestContainerException;
31+
import org.glassfish.jersey.test.spi.TestContainerFactory;
2732
import org.junit.jupiter.api.AfterAll;
2833
import org.junit.jupiter.api.BeforeAll;
2934
import org.junit.jupiter.api.BeforeEach;
@@ -55,8 +60,13 @@ public class SuggesterControllerProjectsDisabledTest extends OGKJerseyTest {
5560
private static TestRepository repository;
5661

5762
@Override
58-
protected Application configure() {
59-
return new RestApp();
63+
protected DeploymentContext configureDeployment() {
64+
return ServletDeploymentContext.forServlet(new ServletContainer(new RestApp())).build();
65+
}
66+
67+
@Override
68+
protected TestContainerFactory getTestContainerFactory() throws TestContainerException {
69+
return new GrizzlyWebTestContainerFactory();
6070
}
6171

6272
@BeforeAll

0 commit comments

Comments
 (0)