Skip to content

Commit

Permalink
Release version 1.1.1: Fix bug in db script handler
Browse files Browse the repository at this point in the history
  • Loading branch information
DevAtHeart committed May 10, 2021
1 parent 61b2f99 commit 2e0a5b4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tests.
### Gradle

```groovy
testImplementation 'com.wholegrain-software:spring-mongodb-test:1.1.0'
testImplementation 'com.wholegrain-software:spring-mongodb-test:1.1.1'
```

### Maven
Expand All @@ -18,7 +18,7 @@ testImplementation 'com.wholegrain-software:spring-mongodb-test:1.1.0'
<dependency>
<groupId>com.wholegrain-software</groupId>
<artifactId>spring-mongodb-test</artifactId>
<version>1.0.0</version>
<version>1.1.1</version>
<scope>test</scope>
</dependency>
```
Expand Down
2 changes: 1 addition & 1 deletion example/spring-example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-data-mongodb")

testImplementation("com.wholegrain-software:spring-mongodb-test:1.1.0")
testImplementation("com.wholegrain-software:spring-mongodb-test:1.1.1")
testImplementation("org.testcontainers:mongodb:1.15.2")
testImplementation("org.testcontainers:junit-jupiter:1.15.2")
testImplementation("org.springframework.boot:spring-boot-starter-test") {
Expand Down
Empty file modified gradlew
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
`maven-publish`
}

version = "1.1.0"
version = "1.1.1"

val springVersion by extra("5.3.4")
val mongoClientVersion by extra("4.1.1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public void runScript(TestContext context, Doc annotation) {
.map((res) -> Document.parse(read(res)))
.collect(Collectors.toList());

databaseNames.add(annotation.db());
inDbSession(context, annotation.db(), (db) -> db.getCollection(annotation.collection()).insertMany(documents));
}

Expand All @@ -70,7 +71,6 @@ public void cleanup(TestContext context) {

private void inDbSession(TestContext context, String databaseName, Consumer<MongoDatabase> script) {
String dbName = databaseName.isEmpty() ? getDatabaseName(context) : databaseName;
databaseNames.add(dbName);
MongoClient client = context.getApplicationContext().getBean(MongoClient.class);
MongoDatabase database = client.getDatabase(dbName);
ClientSession session = client.startSession();
Expand Down

0 comments on commit 2e0a5b4

Please sign in to comment.