Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
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
DEMO
spring-boot
Commits
41674697
Commit
41674697
authored
Mar 24, 2016
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Attempt to work around couchbase CI failures
parent
88f3fa4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
AbstractCouchbaseAutoConfigurationTests.java
...re/couchbase/AbstractCouchbaseAutoConfigurationTests.java
+1
-1
CouchbaseTestServer.java
...ork/boot/autoconfigure/couchbase/CouchbaseTestServer.java
+10
-2
No files found.
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/couchbase/AbstractCouchbaseAutoConfigurationTests.java
View file @
41674697
...
@@ -19,7 +19,7 @@ package org.springframework.boot.autoconfigure.couchbase;
...
@@ -19,7 +19,7 @@ package org.springframework.boot.autoconfigure.couchbase;
import
org.junit.After
;
import
org.junit.After
;
import
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
;
import
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
;
import
org.springframework.boot.test.EnvironmentTestUtils
;
import
org.springframework.boot.test.
util.
EnvironmentTestUtils
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
/**
/**
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/couchbase/CouchbaseTestServer.java
View file @
41674697
...
@@ -30,6 +30,8 @@ import org.junit.rules.TestRule;
...
@@ -30,6 +30,8 @@ import org.junit.rules.TestRule;
import
org.junit.runner.Description
;
import
org.junit.runner.Description
;
import
org.junit.runners.model.Statement
;
import
org.junit.runners.model.Statement
;
import
org.springframework.beans.factory.BeanCreationException
;
/**
/**
* {@link TestRule} for working with an optional Couchbase server. Expects a default
* {@link TestRule} for working with an optional Couchbase server. Expects a default
* {@link Bucket} with no password to be available on localhost.
* {@link Bucket} with no password to be available on localhost.
...
@@ -48,8 +50,7 @@ public class CouchbaseTestServer implements TestRule {
...
@@ -48,8 +50,7 @@ public class CouchbaseTestServer implements TestRule {
public
Statement
apply
(
Statement
base
,
Description
description
)
{
public
Statement
apply
(
Statement
base
,
Description
description
)
{
try
{
try
{
this
.
environment
=
DefaultCouchbaseEnvironment
.
create
();
this
.
environment
=
DefaultCouchbaseEnvironment
.
create
();
this
.
cluster
=
CouchbaseCluster
.
create
(
this
.
environment
,
this
.
cluster
=
CouchbaseCluster
.
create
(
this
.
environment
,
"localhost"
);
"localhost"
);
testConnection
(
this
.
cluster
);
testConnection
(
this
.
cluster
);
return
new
CouchbaseStatement
(
base
,
this
.
environment
,
this
.
cluster
);
return
new
CouchbaseStatement
(
base
,
this
.
environment
,
this
.
cluster
);
}
}
...
@@ -98,6 +99,13 @@ public class CouchbaseTestServer implements TestRule {
...
@@ -98,6 +99,13 @@ public class CouchbaseTestServer implements TestRule {
try
{
try
{
this
.
base
.
evaluate
();
this
.
base
.
evaluate
();
}
}
catch
(
BeanCreationException
ex
)
{
if
(
"couchbaseClient"
.
equals
(
ex
.
getBeanName
()))
{
throw
new
AssumptionViolatedException
(
"Skipping test due to Couchbase error "
+
ex
.
getMessage
(),
ex
);
}
}
finally
{
finally
{
try
{
try
{
this
.
cluster
.
disconnect
();
this
.
cluster
.
disconnect
();
...
...
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