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
c84d20cd
Commit
c84d20cd
authored
Feb 22, 2018
by
Ryan Baxter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reenabling ignored test
parent
276b2ada
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
10 deletions
+7
-10
FeignRibbonClientRetryTests.java
...oud/netflix/feign/ribbon/FeignRibbonClientRetryTests.java
+1
-1
FeignRibbonHttpClientConfigurationTests.java
...feign/ribbon/FeignRibbonHttpClientConfigurationTests.java
+2
-4
FeignRibbonOkHttpClientConfigurationTests.java
...ign/ribbon/FeignRibbonOkHttpClientConfigurationTests.java
+4
-5
No files found.
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/ribbon/FeignRibbonClientRetryTests.java
View file @
c84d20cd
...
...
@@ -54,7 +54,7 @@ import static org.junit.Assert.assertTrue;
@SpringBootTest
(
classes
=
FeignRibbonClientRetryTests
.
Application
.
class
,
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
,
value
=
{
"spring.application.name=feignclientretrytest"
,
"feign.okhttp.enabled=false"
,
"feign.httpclient.enabled=false"
,
"feign.hystrix.enabled=false"
,
"localapp.ribbon.MaxAutoRetries=2"
,
"localapp.ribbon.MaxAutoRetriesNextServer=3"
,
"feign.httpclient.disableSslValidation=false"
})
"localapp.ribbon.MaxAutoRetriesNextServer=3"
})
@DirtiesContext
public
class
FeignRibbonClientRetryTests
{
...
...
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/ribbon/FeignRibbonHttpClientConfigurationTests.java
View file @
c84d20cd
...
...
@@ -24,7 +24,6 @@ import org.apache.http.config.Lookup;
import
org.apache.http.conn.HttpClientConnectionManager
;
import
org.apache.http.conn.socket.ConnectionSocketFactory
;
import
org.apache.http.impl.conn.DefaultHttpClientConnectionOperator
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -32,9 +31,9 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.test.annotation.DirtiesContext
;
import
org.springframework.test.context.junit4.SpringRunner
;
import
org.springframework.util.ReflectionUtils
;
import
org.springframework.web.bind.annotation.RestController
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertNull
;
...
...
@@ -46,13 +45,13 @@ import static org.junit.Assert.assertNull;
@SpringBootTest
(
classes
=
FeignRibbonHttpClientConfigurationTests
.
FeignRibbonHttpClientConfigurationTestsApplication
.
class
,
webEnvironment
=
SpringBootTest
.
WebEnvironment
.
RANDOM_PORT
,
properties
=
{
"debug=true"
,
"feign.httpclient.disableSslValidation=true"
})
@DirtiesContext
public
class
FeignRibbonHttpClientConfigurationTests
{
@Autowired
HttpClientConnectionManager
connectionManager
;
@Test
@Ignore
public
void
disableSslTest
()
throws
Exception
{
Lookup
<
ConnectionSocketFactory
>
socketFactoryRegistry
=
getConnectionSocketFactoryLookup
(
connectionManager
);
assertNotNull
(
socketFactoryRegistry
.
lookup
(
"https"
));
...
...
@@ -80,7 +79,6 @@ public class FeignRibbonHttpClientConfigurationTests {
@Configuration
@EnableAutoConfiguration
@RestController
static
class
FeignRibbonHttpClientConfigurationTestsApplication
{
public
static
void
main
(
String
[]
args
)
{
new
SpringApplicationBuilder
(
FeignRibbonClientRetryTests
.
Application
.
class
)
...
...
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/ribbon/FeignRibbonOkHttpClientConfigurationTests.java
View file @
c84d20cd
...
...
@@ -21,7 +21,6 @@ import okhttp3.OkHttpClient;
import
java.lang.reflect.Field
;
import
javax.net.ssl.HostnameVerifier
;
import
org.junit.Assert
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -30,24 +29,25 @@ import org.springframework.boot.builder.SpringApplicationBuilder;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.cloud.commons.httpclient.OkHttpClientFactory
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.test.annotation.DirtiesContext
;
import
org.springframework.test.context.junit4.SpringRunner
;
import
org.springframework.util.ReflectionUtils
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @author Ryan Baxter
*/
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
FeignRibbonOkHttpClientConfigurationTests
.
FeignRibbonOkHttpClientConfigurationTestsApplication
.
class
,
webEnvironment
=
SpringBootTest
.
WebEnvironment
.
RANDOM_PORT
,
@SpringBootTest
(
classes
=
FeignRibbonOkHttpClientConfigurationTests
.
FeignRibbonOkHttpClientConfigurationTestsApplication
.
class
,
webEnvironment
=
SpringBootTest
.
WebEnvironment
.
RANDOM_PORT
,
properties
=
{
"debug=true"
,
"feign.httpclient.disableSslValidation=true"
,
"feign.okhttp.enabled=true"
,
"feign.httpclient.enabled=false"
})
@DirtiesContext
public
class
FeignRibbonOkHttpClientConfigurationTests
{
@Autowired
OkHttpClient
httpClient
;
@Test
@Ignore
public
void
disableSslTest
()
throws
Exception
{
HostnameVerifier
hostnameVerifier
=
(
HostnameVerifier
)
this
.
getField
(
httpClient
,
"hostnameVerifier"
);
Assert
.
assertTrue
(
OkHttpClientFactory
.
TrustAllHostnames
.
class
.
isInstance
(
hostnameVerifier
));
...
...
@@ -62,7 +62,6 @@ public class FeignRibbonOkHttpClientConfigurationTests {
@Configuration
@EnableAutoConfiguration
@RestController
static
class
FeignRibbonOkHttpClientConfigurationTestsApplication
{
public
static
void
main
(
String
[]
args
)
{
new
SpringApplicationBuilder
(
FeignRibbonClientRetryTests
.
Application
.
class
)
...
...
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