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
cf7664c0
Commit
cf7664c0
authored
Nov 27, 2018
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cope with version not found in Embedded Mongo's Version enum
Closes gh-15311
parent
dee8085f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
EmbeddedMongoAutoConfiguration.java
...figure/mongo/embedded/EmbeddedMongoAutoConfiguration.java
+2
-0
EmbeddedMongoAutoConfigurationTests.java
...e/mongo/embedded/EmbeddedMongoAutoConfigurationTests.java
+8
-1
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfiguration.java
View file @
cf7664c0
...
@@ -156,6 +156,8 @@ public class EmbeddedMongoAutoConfiguration {
...
@@ -156,6 +156,8 @@ public class EmbeddedMongoAutoConfiguration {
return
version
;
return
version
;
}
}
}
}
return
Versions
.
withFeatures
(
new
GenericVersion
(
this
.
embeddedProperties
.
getVersion
()));
}
}
return
Versions
.
withFeatures
(
return
Versions
.
withFeatures
(
new
GenericVersion
(
this
.
embeddedProperties
.
getVersion
()),
new
GenericVersion
(
this
.
embeddedProperties
.
getVersion
()),
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfigurationTests.java
View file @
cf7664c0
...
@@ -24,6 +24,7 @@ import com.mongodb.MongoClient;
...
@@ -24,6 +24,7 @@ import com.mongodb.MongoClient;
import
de.flapdoodle.embed.mongo.config.IMongodConfig
;
import
de.flapdoodle.embed.mongo.config.IMongodConfig
;
import
de.flapdoodle.embed.mongo.config.Storage
;
import
de.flapdoodle.embed.mongo.config.Storage
;
import
de.flapdoodle.embed.mongo.distribution.Feature
;
import
de.flapdoodle.embed.mongo.distribution.Feature
;
import
de.flapdoodle.embed.mongo.distribution.Version
;
import
org.bson.Document
;
import
org.bson.Document
;
import
org.junit.After
;
import
org.junit.After
;
import
org.junit.Test
;
import
org.junit.Test
;
...
@@ -67,7 +68,13 @@ public class EmbeddedMongoAutoConfigurationTests {
...
@@ -67,7 +68,13 @@ public class EmbeddedMongoAutoConfigurationTests {
@Test
@Test
public
void
customVersion
()
{
public
void
customVersion
()
{
assertVersionConfiguration
(
"3.4.15"
,
"3.4.15"
);
String
version
=
Version
.
V3_4_15
.
asInDownloadPath
();
assertVersionConfiguration
(
version
,
version
);
}
@Test
public
void
customUnknownVersion
()
{
assertVersionConfiguration
(
"3.4.1"
,
"3.4.1"
);
}
}
@Test
@Test
...
...
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