Merge branch '2.1.x'
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.springframework.boot.test.autoconfigure.data.mongo;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@@ -44,10 +46,11 @@ public class DataMongoTestReactiveIntegrationTests {
|
||||
public void testRepository() {
|
||||
ExampleDocument exampleDocument = new ExampleDocument();
|
||||
exampleDocument.setText("Look, new @DataMongoTest!");
|
||||
exampleDocument = this.exampleRepository.save(exampleDocument).block();
|
||||
exampleDocument = this.exampleRepository.save(exampleDocument)
|
||||
.block(Duration.ofSeconds(30));
|
||||
assertThat(exampleDocument.getId()).isNotNull();
|
||||
assertThat(this.mongoTemplate.collectionExists("exampleDocuments").block())
|
||||
.isTrue();
|
||||
assertThat(this.mongoTemplate.collectionExists("exampleDocuments")
|
||||
.block(Duration.ofSeconds(30))).isTrue();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user