use of org.sonar.process.Props in project sonarqube by SonarSource.
the class TomcatConnectorsTest method different_thread_pools_for_connectors.
@Test
public void different_thread_pools_for_connectors() {
Properties p = new Properties();
p.setProperty("sonar.web.http.minThreads", "2");
Props props = new Props(p);
TomcatConnectors.configure(tomcat, props);
verifyHttpConnector(DEFAULT_PORT, ImmutableMap.of("minSpareThreads", 2));
}
use of org.sonar.process.Props in project sonarqube by SonarSource.
the class TomcatConnectorsTest method test_max_http_header_size_for_http_connection.
@Test
public void test_max_http_header_size_for_http_connection() {
TomcatConnectors.configure(tomcat, new Props(new Properties()));
verifyHttpConnector(DEFAULT_PORT, ImmutableMap.of("maxHttpHeaderSize", TomcatConnectors.MAX_HTTP_HEADER_SIZE_BYTES));
}
use of org.sonar.process.Props in project sonarqube by SonarSource.
the class TomcatContextsTest method root_context_path_must_be_blank.
@Test
public void root_context_path_must_be_blank() {
props.setProperty("sonar.web.context", "/");
assertThat(TomcatContexts.getContextPath(new Props(props))).isEqualTo("");
}
use of org.sonar.process.Props in project sonarqube by SonarSource.
the class TomcatContextsTest method configure_root_webapp.
@Test
public void configure_root_webapp() throws Exception {
props.setProperty("foo", "bar");
StandardContext context = mock(StandardContext.class);
when(tomcat.addWebapp(anyString(), anyString())).thenReturn(context);
underTest.configure(tomcat, new Props(props));
// configure webapp with properties
verify(context).addParameter("foo", "bar");
}
use of org.sonar.process.Props in project sonarqube by SonarSource.
the class TomcatContextsTest method default_context_path_is_root.
@Test
public void default_context_path_is_root() {
String context = TomcatContexts.getContextPath(new Props(new Properties()));
assertThat(context).isEqualTo("");
}
Aggregations