Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
spring-cloud-netflix
Commits
2c4ae351
Commit
2c4ae351
authored
Feb 21, 2018
by
Ryan Baxter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Making application classes not public
parent
021dc558
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
FeignRibbonHttpClientConfigurationTests.java
...feign/ribbon/FeignRibbonHttpClientConfigurationTests.java
+4
-2
FeignRibbonOkHttpClientConfigurationTests.java
...ign/ribbon/FeignRibbonOkHttpClientConfigurationTests.java
+4
-2
No files found.
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/ribbon/FeignRibbonHttpClientConfigurationTests.java
View file @
2c4ae351
...
@@ -24,6 +24,7 @@ import org.apache.http.config.Lookup;
...
@@ -24,6 +24,7 @@ import org.apache.http.config.Lookup;
import
org.apache.http.conn.HttpClientConnectionManager
;
import
org.apache.http.conn.HttpClientConnectionManager
;
import
org.apache.http.conn.socket.ConnectionSocketFactory
;
import
org.apache.http.conn.socket.ConnectionSocketFactory
;
import
org.apache.http.impl.conn.DefaultHttpClientConnectionOperator
;
import
org.apache.http.impl.conn.DefaultHttpClientConnectionOperator
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -42,7 +43,8 @@ import static org.junit.Assert.assertNull;
...
@@ -42,7 +43,8 @@ import static org.junit.Assert.assertNull;
* @author Ryan Baxter
* @author Ryan Baxter
*/
*/
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
FeignRibbonHttpClientConfigurationTests
.
Application
.
class
,
webEnvironment
=
SpringBootTest
.
WebEnvironment
.
RANDOM_PORT
,
@SpringBootTest
(
classes
=
FeignRibbonHttpClientConfigurationTests
.
FeignRibbonHttpClientConfigurationTestsApplication
.
class
,
webEnvironment
=
SpringBootTest
.
WebEnvironment
.
RANDOM_PORT
,
properties
=
{
"debug=true"
,
"feign.httpclient.disableSslValidation=true"
})
properties
=
{
"debug=true"
,
"feign.httpclient.disableSslValidation=true"
})
public
class
FeignRibbonHttpClientConfigurationTests
{
public
class
FeignRibbonHttpClientConfigurationTests
{
...
@@ -78,7 +80,7 @@ public class FeignRibbonHttpClientConfigurationTests {
...
@@ -78,7 +80,7 @@ public class FeignRibbonHttpClientConfigurationTests {
@Configuration
@Configuration
@EnableAutoConfiguration
@EnableAutoConfiguration
@RestController
@RestController
public
static
class
Application
{
static
class
FeignRibbonHttpClientConfigurationTests
Application
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
new
SpringApplicationBuilder
(
FeignRibbonClientRetryTests
.
Application
.
class
)
new
SpringApplicationBuilder
(
FeignRibbonClientRetryTests
.
Application
.
class
)
.
run
(
args
);
.
run
(
args
);
...
...
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/ribbon/FeignRibbonOkHttpClientConfigurationTests.java
View file @
2c4ae351
...
@@ -21,6 +21,7 @@ import okhttp3.OkHttpClient;
...
@@ -21,6 +21,7 @@ import okhttp3.OkHttpClient;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
import
javax.net.ssl.HostnameVerifier
;
import
javax.net.ssl.HostnameVerifier
;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -37,7 +38,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -37,7 +38,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Ryan Baxter
* @author Ryan Baxter
*/
*/
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
FeignRibbonOkHttpClientConfigurationTests
.
Application
.
class
,
webEnvironment
=
SpringBootTest
.
WebEnvironment
.
RANDOM_PORT
,
@SpringBootTest
(
classes
=
FeignRibbonOkHttpClientConfigurationTests
.
FeignRibbonOkHttpClientConfigurationTests
Application
.
class
,
webEnvironment
=
SpringBootTest
.
WebEnvironment
.
RANDOM_PORT
,
properties
=
{
"debug=true"
,
"feign.httpclient.disableSslValidation=true"
,
properties
=
{
"debug=true"
,
"feign.httpclient.disableSslValidation=true"
,
"feign.okhttp.enabled=true"
,
"feign.httpclient.enabled=false"
})
"feign.okhttp.enabled=true"
,
"feign.httpclient.enabled=false"
})
public
class
FeignRibbonOkHttpClientConfigurationTests
{
public
class
FeignRibbonOkHttpClientConfigurationTests
{
...
@@ -46,6 +47,7 @@ public class FeignRibbonOkHttpClientConfigurationTests {
...
@@ -46,6 +47,7 @@ public class FeignRibbonOkHttpClientConfigurationTests {
OkHttpClient
httpClient
;
OkHttpClient
httpClient
;
@Test
@Test
@Ignore
public
void
disableSslTest
()
throws
Exception
{
public
void
disableSslTest
()
throws
Exception
{
HostnameVerifier
hostnameVerifier
=
(
HostnameVerifier
)
this
.
getField
(
httpClient
,
"hostnameVerifier"
);
HostnameVerifier
hostnameVerifier
=
(
HostnameVerifier
)
this
.
getField
(
httpClient
,
"hostnameVerifier"
);
Assert
.
assertTrue
(
OkHttpClientFactory
.
TrustAllHostnames
.
class
.
isInstance
(
hostnameVerifier
));
Assert
.
assertTrue
(
OkHttpClientFactory
.
TrustAllHostnames
.
class
.
isInstance
(
hostnameVerifier
));
...
@@ -61,7 +63,7 @@ public class FeignRibbonOkHttpClientConfigurationTests {
...
@@ -61,7 +63,7 @@ public class FeignRibbonOkHttpClientConfigurationTests {
@Configuration
@Configuration
@EnableAutoConfiguration
@EnableAutoConfiguration
@RestController
@RestController
public
static
class
Application
{
static
class
FeignRibbonOkHttpClientConfigurationTests
Application
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
new
SpringApplicationBuilder
(
FeignRibbonClientRetryTests
.
Application
.
class
)
new
SpringApplicationBuilder
(
FeignRibbonClientRetryTests
.
Application
.
class
)
.
run
(
args
);
.
run
(
args
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment