diff options
author | jonmv <venstad@gmail.com> | 2023-10-05 16:56:47 +0200 |
---|---|---|
committer | jonmv <venstad@gmail.com> | 2023-10-05 16:56:47 +0200 |
commit | 1031323b5f08f02e25c79a8653987ed7d70e12a6 (patch) | |
tree | 3db700aa4a8be893136dd8f87ed6f0d794561fdf /config-model/src/test | |
parent | 4442e0ebf35867a85128088471be38afc61e0ef0 (diff) |
Isolate inner jetty server component from wrapper with filters
Diffstat (limited to 'config-model/src/test')
-rw-r--r-- | config-model/src/test/java/com/yahoo/vespa/model/container/xml/JettyContainerModelBuilderTest.java | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/JettyContainerModelBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/JettyContainerModelBuilderTest.java index 89cce7feacb..5da5930515c 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/JettyContainerModelBuilderTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/JettyContainerModelBuilderTest.java @@ -77,23 +77,27 @@ public class JettyContainerModelBuilderTest extends ContainerModelBuilderTestBas } @Test - void verifyThatJettyHttpServerHasFilterBindingsProvider() { + void verifyThatJettyHttpServerContextHasFilterBindingsProvider() { final Element clusterElem = DomBuilderTest.parse( "<container id='default' version='1.0'>", nodesXml, "</container>"); createModel(root, clusterElem); - final ComponentsConfig.Components jettyHttpServerComponent = extractComponentByClassName( + ComponentsConfig.Components jettyHttpServerComponent = extractComponentByClassName( containerComponentsConfig(), com.yahoo.jdisc.http.server.jetty.JettyHttpServer.class.getName()); assertNotNull(jettyHttpServerComponent); - final ComponentsConfig.Components filterBindingsProviderComponent = extractComponentByClassName( + ComponentsConfig.Components jettyHttpServerContextComponent = extractComponentByClassName( + containerComponentsConfig(), com.yahoo.jdisc.http.server.jetty.JettyHttpServerContext.class.getName()); + assertNotNull(jettyHttpServerContextComponent); + + ComponentsConfig.Components filterBindingsProviderComponent = extractComponentByClassName( containerComponentsConfig(), FilterBindingsProvider.class.getName()); assertNotNull(filterBindingsProviderComponent); - final ComponentsConfig.Components.Inject filterBindingsProviderInjection = extractInjectionById( - jettyHttpServerComponent, filterBindingsProviderComponent.id()); + ComponentsConfig.Components.Inject filterBindingsProviderInjection = extractInjectionById( + jettyHttpServerContextComponent, filterBindingsProviderComponent.id()); assertNotNull(filterBindingsProviderInjection); } @@ -112,12 +116,16 @@ public class JettyContainerModelBuilderTest extends ContainerModelBuilderTestBas clusterComponentsConfig(), com.yahoo.jdisc.http.server.jetty.JettyHttpServer.class.getName()); assertNotNull(jettyHttpServerComponent); + final ComponentsConfig.Components jettyHttpServerContextComponent = extractComponentByClassName( + clusterComponentsConfig(), com.yahoo.jdisc.http.server.jetty.JettyHttpServerContext.class.getName()); + assertNotNull(jettyHttpServerContextComponent); + final ComponentsConfig.Components filterBindingsProviderComponent = extractComponentByClassName( clusterComponentsConfig(), FilterBindingsProvider.class.getName()); assertNotNull(filterBindingsProviderComponent); final ComponentsConfig.Components.Inject filterBindingsProviderInjection = extractInjectionById( - jettyHttpServerComponent, filterBindingsProviderComponent.id()); + jettyHttpServerContextComponent, filterBindingsProviderComponent.id()); assertNotNull(filterBindingsProviderInjection); } |