Skip to content

Commit

Permalink
Add Apache5 properties to be grabbed by config
Browse files Browse the repository at this point in the history
Signed-off-by: jansupol <jan.supol@oracle.com>
  • Loading branch information
jansupol committed Feb 15, 2024
1 parent 604cf2e commit d6fc6e3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -29,6 +29,7 @@ class JerseySystemPropertiesConfigurationModel extends SystemPropertiesConfigura
"org.glassfish.jersey.servlet.ServletProperties",
"org.glassfish.jersey.message.MessageProperties",
"org.glassfish.jersey.apache.connector.ApacheClientProperties",
"org.glassfish.jersey.apache5.connector.ApacheClientProperties",
"org.glassfish.jersey.helidon.connector.HelidonClientProperties",
"org.glassfish.jersey.jdk.connector.JdkConnectorProperties",
"org.glassfish.jersey.jetty.connector.JettyClientProperties",
Expand Down
7 changes: 6 additions & 1 deletion tests/integration/property-check/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2014, 2024 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -72,6 +72,11 @@
<artifactId>jersey-apache-connector</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.connectors</groupId>
<artifactId>jersey-apache5-connector</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.security</groupId>
<artifactId>oauth1-server</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -32,6 +32,7 @@

import org.glassfish.jersey.CommonProperties;
import org.glassfish.jersey.apache.connector.ApacheClientProperties;
import org.glassfish.jersey.apache5.connector.Apache5ClientProperties;
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.internal.InternalProperties;
import org.glassfish.jersey.internal.util.JdkVersion;
Expand Down Expand Up @@ -88,6 +89,7 @@ public void propertyLoadedWhenSecurityException() {
System.setProperty(ServletProperties.JAXRS_APPLICATION_CLASS, TEST_STRING);
System.setProperty(MessageProperties.IO_BUFFER_SIZE, TEST_STRING);
System.setProperty(ApacheClientProperties.DISABLE_COOKIES, TEST_STRING);
System.setProperty(Apache5ClientProperties.DISABLE_COOKIES, TEST_STRING);
System.setProperty(JettyClientProperties.ENABLE_SSL_HOSTNAME_VERIFICATION, TEST_STRING);
System.setProperty(MultiPartProperties.TEMP_DIRECTORY, TEST_STRING);
System.setProperty(OAuth1ServerProperties.REALM, TEST_STRING);
Expand All @@ -109,7 +111,9 @@ public void propertyLoadedWhenSecurityException() {
assertEquals(TEST_STRING, properties.get(MessageProperties.IO_BUFFER_SIZE));
assertFalse(properties.containsKey(MessageProperties.DEFLATE_WITHOUT_ZLIB));
assertEquals(TEST_STRING, properties.get(ApacheClientProperties.DISABLE_COOKIES));
assertEquals(TEST_STRING, properties.get(Apache5ClientProperties.DISABLE_COOKIES));
assertFalse(properties.containsKey(ApacheClientProperties.CONNECTION_MANAGER));
assertFalse(properties.containsKey(Apache5ClientProperties.CONNECTION_MANAGER));
assertEquals(TEST_STRING, properties.get(JettyClientProperties.ENABLE_SSL_HOSTNAME_VERIFICATION));
assertFalse(properties.containsKey(JettyClientProperties.DISABLE_COOKIES));
assertEquals(TEST_STRING, properties.get(MultiPartProperties.TEMP_DIRECTORY));
Expand Down

0 comments on commit d6fc6e3

Please sign in to comment.