Polish smoke tests

See gh-35042
pull/35256/head
Scott Frederick 2 years ago
parent 23ae91b008
commit a4b81e4326

@ -19,7 +19,7 @@ package smoketest.data.mongo;
import org.springframework.data.mongodb.core.mapping.Document;
@Document(collection = "exampleDocuments")
public class ExampleDocument {
public class SampleDocument {
private String id;

@ -19,6 +19,6 @@ package smoketest.data.mongo;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class ExampleMongoApplication {
public class SampleMongoApplication {
}

@ -18,6 +18,6 @@ package smoketest.data.mongo;
import org.springframework.data.mongodb.repository.ReactiveMongoRepository;
interface ExampleReactiveRepository extends ReactiveMongoRepository<ExampleDocument, String> {
interface SampleReactiveRepository extends ReactiveMongoRepository<SampleDocument, String> {
}

@ -18,6 +18,6 @@ package smoketest.data.mongo;
import org.springframework.data.mongodb.repository.MongoRepository;
interface ExampleRepository extends MongoRepository<ExampleDocument, String> {
interface SampleRepository extends MongoRepository<SampleDocument, String> {
}

@ -20,11 +20,11 @@ import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Service;
@Service
public class ExampleService {
public class SampleService {
private final MongoTemplate mongoTemplate;
public ExampleService(MongoTemplate mongoTemplate) {
public SampleService(MongoTemplate mongoTemplate) {
this.mongoTemplate = mongoTemplate;
}

@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat;
"spring.ssl.bundle.pem.client.keystore.certificate=classpath:ssl/test-client.crt",
"spring.ssl.bundle.pem.client.keystore.private-key=classpath:ssl/test-client.key",
"spring.ssl.bundle.pem.client.truststore.certificate=classpath:ssl/test-ca.crt" })
class DataMongoTestReactiveSslIntegrationTests {
class SampleMongoApplicationReactiveSslTests {
@Container
@ServiceConnection
@ -50,11 +50,11 @@ class DataMongoTestReactiveSslIntegrationTests {
private ReactiveMongoTemplate mongoTemplate;
@Autowired
private ExampleReactiveRepository exampleRepository;
private SampleReactiveRepository exampleRepository;
@Test
void testRepository() {
ExampleDocument exampleDocument = new ExampleDocument();
SampleDocument exampleDocument = new SampleDocument();
exampleDocument.setText("Look, new @DataMongoTest!");
exampleDocument = this.exampleRepository.save(exampleDocument).block(Duration.ofSeconds(30));
assertThat(exampleDocument.getId()).isNotNull();

@ -41,7 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat;
"spring.ssl.bundle.pem.client.keystore.private-key=classpath:ssl/test-client.key",
"spring.ssl.bundle.pem.client.truststore.certificate=classpath:ssl/test-ca.crt" })
@ImportAutoConfiguration(SslAutoConfiguration.class)
class DataMongoTestSslIntegrationTests {
class SampleMongoApplicationSslTests {
@Container
@ServiceConnection
@ -51,11 +51,11 @@ class DataMongoTestSslIntegrationTests {
private MongoTemplate mongoTemplate;
@Autowired
private ExampleRepository exampleRepository;
private SampleRepository exampleRepository;
@Test
void testRepository() {
ExampleDocument exampleDocument = new ExampleDocument();
SampleDocument exampleDocument = new SampleDocument();
exampleDocument.setText("Look, new @DataMongoTest!");
exampleDocument = this.exampleRepository.save(exampleDocument);
assertThat(exampleDocument.getId()).isNotNull();
Loading…
Cancel
Save