From 8fe47aaebd06f9674e958720df85156d048b2321 Mon Sep 17 00:00:00 2001 From: Scott Frederick Date: Thu, 5 May 2022 15:35:38 -0500 Subject: [PATCH] Remove smoke tests that do nothing without a server Fixes gh-30875 --- .../build.gradle | 12 ---- .../couchbase/SampleCouchbaseApplication.java | 51 ------------- .../java/smoketest/data/couchbase/User.java | 65 ----------------- .../data/couchbase/UserRepository.java | 23 ------ .../src/main/resources/application.properties | 8 --- .../SampleCouchbaseApplicationTests.java | 59 --------------- .../build.gradle | 12 ---- .../data/elasticsearch/Customer.java | 71 ------------------- .../elasticsearch/CustomerRepository.java | 29 -------- .../SampleElasticsearchApplication.java | 68 ------------------ .../src/main/resources/application.properties | 1 - .../SampleElasticsearchApplicationTests.java | 63 ---------------- .../build.gradle | 15 ---- .../java/smoketest/data/mongo/Customer.java | 43 ----------- .../data/mongo/CustomerRepository.java | 29 -------- .../data/mongo/SampleMongoApplication.java | 70 ------------------ .../mongo/SampleMongoApplicationTests.java | 47 ------------ .../build.gradle | 12 ---- .../java/smoketest/data/neo4j/Customer.java | 47 ------------ .../data/neo4j/CustomerRepository.java | 29 -------- .../data/neo4j/SampleNeo4jApplication.java | 62 ---------------- .../src/main/resources/application.properties | 0 .../neo4j/SampleNeo4jApplicationTests.java | 56 --------------- .../build.gradle | 12 ---- .../data/redis/SampleRedisApplication.java | 47 ------------ .../redis/SampleRedisApplicationTests.java | 57 --------------- 26 files changed, 988 deletions(-) delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/build.gradle delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/main/java/smoketest/data/couchbase/SampleCouchbaseApplication.java delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/main/java/smoketest/data/couchbase/User.java delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/main/java/smoketest/data/couchbase/UserRepository.java delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/main/resources/application.properties delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/test/java/smoketest/data/couchbase/SampleCouchbaseApplicationTests.java delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/build.gradle delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/src/main/java/smoketest/data/elasticsearch/Customer.java delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/src/main/java/smoketest/data/elasticsearch/CustomerRepository.java delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/src/main/java/smoketest/data/elasticsearch/SampleElasticsearchApplication.java delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/src/main/resources/application.properties delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/src/test/java/smoketest/data/elasticsearch/SampleElasticsearchApplicationTests.java delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-mongodb/build.gradle delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-mongodb/src/main/java/smoketest/data/mongo/Customer.java delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-mongodb/src/main/java/smoketest/data/mongo/CustomerRepository.java delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-mongodb/src/main/java/smoketest/data/mongo/SampleMongoApplication.java delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-mongodb/src/test/java/smoketest/data/mongo/SampleMongoApplicationTests.java delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/build.gradle delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/src/main/java/smoketest/data/neo4j/Customer.java delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/src/main/java/smoketest/data/neo4j/CustomerRepository.java delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/src/main/java/smoketest/data/neo4j/SampleNeo4jApplication.java delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/src/main/resources/application.properties delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/src/test/java/smoketest/data/neo4j/SampleNeo4jApplicationTests.java delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-redis/build.gradle delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-redis/src/main/java/smoketest/data/redis/SampleRedisApplication.java delete mode 100644 spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-redis/src/test/java/smoketest/data/redis/SampleRedisApplicationTests.java diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/build.gradle deleted file mode 100644 index 9f4ceffe3cf..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/build.gradle +++ /dev/null @@ -1,12 +0,0 @@ -plugins { - id "java" - id "org.springframework.boot.conventions" -} - -description = "Spring Boot Data Couchbase smoke test" - -dependencies { - implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-data-couchbase")) - - testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/main/java/smoketest/data/couchbase/SampleCouchbaseApplication.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/main/java/smoketest/data/couchbase/SampleCouchbaseApplication.java deleted file mode 100644 index 96dcd52f415..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/main/java/smoketest/data/couchbase/SampleCouchbaseApplication.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2012-2019 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package smoketest.data.couchbase; - -import java.util.UUID; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.CommandLineRunner; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SampleCouchbaseApplication implements CommandLineRunner { - - @Autowired - private UserRepository userRepository; - - public static void main(String[] args) { - SpringApplication.run(SampleCouchbaseApplication.class); - } - - @Override - public void run(String... args) throws Exception { - this.userRepository.deleteAll(); - User user = saveUser(); - System.out.println(this.userRepository.findById(user.getId())); - } - - private User saveUser() { - User user = new User(); - user.setId(UUID.randomUUID().toString()); - user.setFirstName("Alice"); - user.setLastName("Smith"); - return this.userRepository.save(user); - } - -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/main/java/smoketest/data/couchbase/User.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/main/java/smoketest/data/couchbase/User.java deleted file mode 100644 index 2f7364c216c..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/main/java/smoketest/data/couchbase/User.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2012-2020 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package smoketest.data.couchbase; - -import org.springframework.data.annotation.Id; -import org.springframework.data.couchbase.core.mapping.Document; -import org.springframework.data.couchbase.core.mapping.Field; - -@Document -public class User { - - @Id - private String id; - - @Field - private String firstName; - - @Field - private String lastName; - - public String getId() { - return this.id; - } - - public void setId(String id) { - this.id = id; - } - - public String getFirstName() { - return this.firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return this.lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - @Override - public String toString() { - return "User{id='" + this.id + '\'' + ", firstName='" + this.firstName + '\'' + ", lastName='" + this.lastName - + '\'' + '}'; - } - -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/main/java/smoketest/data/couchbase/UserRepository.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/main/java/smoketest/data/couchbase/UserRepository.java deleted file mode 100644 index ff1ad58c162..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/main/java/smoketest/data/couchbase/UserRepository.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2012-2020 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package smoketest.data.couchbase; - -import org.springframework.data.couchbase.repository.CouchbaseRepository; - -public interface UserRepository extends CouchbaseRepository { - -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/main/resources/application.properties b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/main/resources/application.properties deleted file mode 100644 index 9cc0b988b78..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/main/resources/application.properties +++ /dev/null @@ -1,8 +0,0 @@ -spring.couchbase.connection-string=couchbase://127.0.0.1 -spring.couchbase.username=admin -spring.couchbase.password=secret - -spring.couchbase.env.timeouts.connect=15s - -spring.data.couchbase.auto-index=true -spring.data.couchbase.bucket-name=default diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/test/java/smoketest/data/couchbase/SampleCouchbaseApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/test/java/smoketest/data/couchbase/SampleCouchbaseApplicationTests.java deleted file mode 100644 index 8c70795a9ca..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/test/java/smoketest/data/couchbase/SampleCouchbaseApplicationTests.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2012-2021 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package smoketest.data.couchbase; - -import com.couchbase.client.core.error.AmbiguousTimeoutException; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.test.system.CapturedOutput; -import org.springframework.boot.test.system.OutputCaptureExtension; -import org.springframework.core.NestedCheckedException; - -import static org.assertj.core.api.Assertions.assertThat; - -@ExtendWith(OutputCaptureExtension.class) -class SampleCouchbaseApplicationTests { - - @Test - void testDefaultSettings(CapturedOutput output) { - try { - new SpringApplicationBuilder(SampleCouchbaseApplication.class).run("--server.port=0"); - } - catch (RuntimeException ex) { - if (serverNotRunning(ex)) { - return; - } - } - assertThat(output).contains("firstName='Alice', lastName='Smith'"); - } - - private boolean serverNotRunning(RuntimeException ex) { - NestedCheckedException nested = new NestedCheckedException("failed", ex) { - }; - if (nested.contains(AmbiguousTimeoutException.class)) { - Throwable root = nested.getRootCause(); - // This is not ideal, we should have a better way to know what is going on - if (root.getMessage().contains("QueryRequest, Reason: TIMEOUT")) { - return true; - } - } - return false; - } - -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/build.gradle deleted file mode 100644 index 20b46dc9149..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/build.gradle +++ /dev/null @@ -1,12 +0,0 @@ -plugins { - id "java" - id "org.springframework.boot.conventions" -} - -description = "Spring Boot Data Elasticsearch smoke test" - -dependencies { - implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-data-elasticsearch")) - - testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/src/main/java/smoketest/data/elasticsearch/Customer.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/src/main/java/smoketest/data/elasticsearch/Customer.java deleted file mode 100644 index b5c24f933cf..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/src/main/java/smoketest/data/elasticsearch/Customer.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2012-2021 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package smoketest.data.elasticsearch; - -import org.springframework.data.annotation.Id; -import org.springframework.data.elasticsearch.annotations.Document; -import org.springframework.data.elasticsearch.annotations.Setting; - -@Document(indexName = "customer") -@Setting(shards = 1, replicas = 0, refreshInterval = "-1") -public class Customer { - - @Id - private String id; - - private String firstName; - - private String lastName; - - public Customer() { - } - - public Customer(String firstName, String lastName) { - this.firstName = firstName; - this.lastName = lastName; - } - - public String getId() { - return this.id; - } - - public void setId(String id) { - this.id = id; - } - - public String getFirstName() { - return this.firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return this.lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - @Override - public String toString() { - return String.format("Customer[id=%s, firstName='%s', lastName='%s']", this.id, this.firstName, this.lastName); - } - -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/src/main/java/smoketest/data/elasticsearch/CustomerRepository.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/src/main/java/smoketest/data/elasticsearch/CustomerRepository.java deleted file mode 100644 index c009f2fcbcb..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/src/main/java/smoketest/data/elasticsearch/CustomerRepository.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2012-2019 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package smoketest.data.elasticsearch; - -import java.util.List; - -import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; - -public interface CustomerRepository extends ElasticsearchRepository { - - Customer findByFirstName(String firstName); - - List findByLastName(String lastName); - -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/src/main/java/smoketest/data/elasticsearch/SampleElasticsearchApplication.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/src/main/java/smoketest/data/elasticsearch/SampleElasticsearchApplication.java deleted file mode 100644 index e4b90f7dd63..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/src/main/java/smoketest/data/elasticsearch/SampleElasticsearchApplication.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2012-2019 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package smoketest.data.elasticsearch; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.CommandLineRunner; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SampleElasticsearchApplication implements CommandLineRunner { - - @Autowired - private CustomerRepository repository; - - @Override - public void run(String... args) throws Exception { - this.repository.deleteAll(); - saveCustomers(); - fetchAllCustomers(); - fetchIndividualCustomers(); - } - - private void saveCustomers() { - this.repository.save(new Customer("Alice", "Smith")); - this.repository.save(new Customer("Bob", "Smith")); - } - - private void fetchAllCustomers() { - System.out.println("Customers found with findAll():"); - System.out.println("-------------------------------"); - for (Customer customer : this.repository.findAll()) { - System.out.println(customer); - } - System.out.println(); - } - - private void fetchIndividualCustomers() { - System.out.println("Customer found with findByFirstName('Alice'):"); - System.out.println("--------------------------------"); - System.out.println(this.repository.findByFirstName("Alice")); - - System.out.println("Customers found with findByLastName('Smith'):"); - System.out.println("--------------------------------"); - for (Customer customer : this.repository.findByLastName("Smith")) { - System.out.println(customer); - } - } - - public static void main(String[] args) { - SpringApplication.run(SampleElasticsearchApplication.class, "--debug").close(); - } - -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/src/main/resources/application.properties b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/src/main/resources/application.properties deleted file mode 100644 index a0380479513..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ -spring.elasticsearch.rest.uris=localhost:9200 diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/src/test/java/smoketest/data/elasticsearch/SampleElasticsearchApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/src/test/java/smoketest/data/elasticsearch/SampleElasticsearchApplicationTests.java deleted file mode 100644 index 44f1f52581e..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-elasticsearch/src/test/java/smoketest/data/elasticsearch/SampleElasticsearchApplicationTests.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2012-2019 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package smoketest.data.elasticsearch; - -import java.net.ConnectException; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.test.system.CapturedOutput; -import org.springframework.boot.test.system.OutputCaptureExtension; - -import static org.assertj.core.api.Assertions.assertThat; - -/** - * Tests for {@link SampleElasticsearchApplication}. - * - * @author Artur Konczak - */ -@ExtendWith(OutputCaptureExtension.class) -class SampleElasticsearchApplicationTests { - - @Test - void testDefaultSettings(CapturedOutput output) { - try { - new SpringApplicationBuilder(SampleElasticsearchApplication.class).run(); - } - catch (Exception ex) { - if (!elasticsearchRunning(ex)) { - return; - } - throw ex; - } - assertThat(output).contains("firstName='Alice', lastName='Smith'"); - } - - private boolean elasticsearchRunning(Exception ex) { - Throwable candidate = ex; - while (candidate != null) { - if (candidate instanceof ConnectException) { - return false; - } - candidate = candidate.getCause(); - } - return true; - } - -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-mongodb/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-mongodb/build.gradle deleted file mode 100644 index 3d840d6e292..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-mongodb/build.gradle +++ /dev/null @@ -1,15 +0,0 @@ -plugins { - id "java" - id "org.springframework.boot.conventions" -} - -description = "Spring Boot Data MongoDB smoke test" - -dependencies { - implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-data-mongodb")) - - runtimeOnly("de.flapdoodle.embed:de.flapdoodle.embed.mongo") - - testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) - testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-mongodb/src/main/java/smoketest/data/mongo/Customer.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-mongodb/src/main/java/smoketest/data/mongo/Customer.java deleted file mode 100644 index af7f0ee24c6..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-mongodb/src/main/java/smoketest/data/mongo/Customer.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2012-2019 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package smoketest.data.mongo; - -import org.springframework.data.annotation.Id; - -public class Customer { - - @Id - private String id; - - private String firstName; - - private String lastName; - - public Customer() { - } - - public Customer(String firstName, String lastName) { - this.firstName = firstName; - this.lastName = lastName; - } - - @Override - public String toString() { - return String.format("Customer[id=%s, firstName='%s', lastName='%s']", this.id, this.firstName, this.lastName); - } - -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-mongodb/src/main/java/smoketest/data/mongo/CustomerRepository.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-mongodb/src/main/java/smoketest/data/mongo/CustomerRepository.java deleted file mode 100644 index be744ec3cac..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-mongodb/src/main/java/smoketest/data/mongo/CustomerRepository.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2012-2019 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package smoketest.data.mongo; - -import java.util.List; - -import org.springframework.data.mongodb.repository.MongoRepository; - -public interface CustomerRepository extends MongoRepository { - - Customer findByFirstName(String firstName); - - List findByLastName(String lastName); - -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-mongodb/src/main/java/smoketest/data/mongo/SampleMongoApplication.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-mongodb/src/main/java/smoketest/data/mongo/SampleMongoApplication.java deleted file mode 100644 index 10f9a81d682..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-mongodb/src/main/java/smoketest/data/mongo/SampleMongoApplication.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2012-2021 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package smoketest.data.mongo; - -import java.util.concurrent.TimeUnit; - -import org.springframework.boot.CommandLineRunner; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.autoconfigure.mongo.MongoClientSettingsBuilderCustomizer; -import org.springframework.context.annotation.Bean; - -@SpringBootApplication -public class SampleMongoApplication { - - @Bean - public CommandLineRunner exampleRunner(CustomerRepository repository) { - return (args) -> { - repository.deleteAll(); - - // save a couple of customers - repository.save(new Customer("Alice", "Smith")); - repository.save(new Customer("Bob", "Smith")); - - // fetch all customers - System.out.println("Customers found with findAll():"); - System.out.println("-------------------------------"); - for (Customer customer : repository.findAll()) { - System.out.println(customer); - } - System.out.println(); - - // fetch an individual customer - System.out.println("Customer found with findByFirstName('Alice'):"); - System.out.println("--------------------------------"); - System.out.println(repository.findByFirstName("Alice")); - - System.out.println("Customers found with findByLastName('Smith'):"); - System.out.println("--------------------------------"); - for (Customer customer : repository.findByLastName("Smith")) { - System.out.println(customer); - } - }; - } - - @Bean - public MongoClientSettingsBuilderCustomizer customizer() { - return (builder) -> builder.applyToConnectionPoolSettings( - (connectionPool) -> connectionPool.maxConnectionIdleTime(5, TimeUnit.MINUTES)); - } - - public static void main(String[] args) { - SpringApplication.run(SampleMongoApplication.class, args); - } - -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-mongodb/src/test/java/smoketest/data/mongo/SampleMongoApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-mongodb/src/test/java/smoketest/data/mongo/SampleMongoApplicationTests.java deleted file mode 100644 index 81af15f6534..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-mongodb/src/test/java/smoketest/data/mongo/SampleMongoApplicationTests.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2012-2022 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package smoketest.data.mongo; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.OS; -import org.junit.jupiter.api.extension.ExtendWith; - -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.system.CapturedOutput; -import org.springframework.boot.test.system.OutputCaptureExtension; -import org.springframework.boot.testsupport.junit.DisabledOnOs; - -import static org.assertj.core.api.Assertions.assertThat; - -/** - * Tests for {@link SampleMongoApplication}. - * - * @author Dave Syer - * @author Andy Wilkinson - */ -@ExtendWith(OutputCaptureExtension.class) -@SpringBootTest -@DisabledOnOs(os = OS.LINUX, architecture = "aarch64", - disabledReason = "Embedded Mongo doesn't support Linux aarch64, see https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/issues/379") -class SampleMongoApplicationTests { - - @Test - void testDefaultSettings(CapturedOutput output) { - assertThat(output).contains("firstName='Alice', lastName='Smith'"); - } - -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/build.gradle deleted file mode 100644 index 233d3efeab1..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/build.gradle +++ /dev/null @@ -1,12 +0,0 @@ -plugins { - id "java" - id "org.springframework.boot.conventions" -} - -description = "Spring Boot Data Neo4j smoke test" - -dependencies { - implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-data-neo4j")) - - testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/src/main/java/smoketest/data/neo4j/Customer.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/src/main/java/smoketest/data/neo4j/Customer.java deleted file mode 100644 index b9663eece4d..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/src/main/java/smoketest/data/neo4j/Customer.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2012-2020 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package smoketest.data.neo4j; - -import org.springframework.data.neo4j.core.schema.GeneratedValue; -import org.springframework.data.neo4j.core.schema.Id; -import org.springframework.data.neo4j.core.schema.Node; - -@Node -public class Customer { - - @Id - @GeneratedValue - private Long id; - - private String firstName; - - private String lastName; - - public Customer() { - } - - public Customer(String firstName, String lastName) { - this.firstName = firstName; - this.lastName = lastName; - } - - @Override - public String toString() { - return String.format("Customer[id=%s, firstName='%s', lastName='%s']", this.id, this.firstName, this.lastName); - } - -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/src/main/java/smoketest/data/neo4j/CustomerRepository.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/src/main/java/smoketest/data/neo4j/CustomerRepository.java deleted file mode 100644 index 113ed6e9e4f..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/src/main/java/smoketest/data/neo4j/CustomerRepository.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2012-2019 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package smoketest.data.neo4j; - -import java.util.List; - -import org.springframework.data.neo4j.repository.Neo4jRepository; - -public interface CustomerRepository extends Neo4jRepository { - - Customer findByFirstName(String firstName); - - List findByLastName(String lastName); - -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/src/main/java/smoketest/data/neo4j/SampleNeo4jApplication.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/src/main/java/smoketest/data/neo4j/SampleNeo4jApplication.java deleted file mode 100644 index 29d1638a3db..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/src/main/java/smoketest/data/neo4j/SampleNeo4jApplication.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2012-2019 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package smoketest.data.neo4j; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.CommandLineRunner; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SampleNeo4jApplication implements CommandLineRunner { - - @Autowired - private CustomerRepository repository; - - @Override - public void run(String... args) throws Exception { - this.repository.deleteAll(); - - // save a couple of customers - this.repository.save(new Customer("Alice", "Smith")); - this.repository.save(new Customer("Bob", "Smith")); - - // fetch all customers - System.out.println("Customers found with findAll():"); - System.out.println("-------------------------------"); - for (Customer customer : this.repository.findAll()) { - System.out.println(customer); - } - System.out.println(); - - // fetch an individual customer - System.out.println("Customer found with findByFirstName('Alice'):"); - System.out.println("--------------------------------"); - System.out.println(this.repository.findByFirstName("Alice")); - - System.out.println("Customers found with findByLastName('Smith'):"); - System.out.println("--------------------------------"); - for (Customer customer : this.repository.findByLastName("Smith")) { - System.out.println(customer); - } - } - - public static void main(String[] args) { - SpringApplication.run(SampleNeo4jApplication.class, args); - } - -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/src/main/resources/application.properties b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/src/main/resources/application.properties deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/src/test/java/smoketest/data/neo4j/SampleNeo4jApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/src/test/java/smoketest/data/neo4j/SampleNeo4jApplicationTests.java deleted file mode 100644 index c1f7218fc4e..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-neo4j/src/test/java/smoketest/data/neo4j/SampleNeo4jApplicationTests.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2012-2019 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package smoketest.data.neo4j; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.neo4j.driver.exceptions.ServiceUnavailableException; - -import org.springframework.boot.test.system.CapturedOutput; -import org.springframework.boot.test.system.OutputCaptureExtension; - -import static org.assertj.core.api.Assertions.assertThat; - -/** - * Tests for {@link SampleNeo4jApplication}. - * - * @author Stephane Nicoll - */ -@ExtendWith(OutputCaptureExtension.class) -class SampleNeo4jApplicationTests { - - @Test - void testDefaultSettings(CapturedOutput output) { - try { - SampleNeo4jApplication.main(new String[0]); - } - catch (Exception ex) { - if (!neo4jServerRunning(ex)) { - return; - } - } - assertThat(output).contains("firstName='Alice', lastName='Smith'"); - } - - private boolean neo4jServerRunning(Throwable ex) { - if (ex instanceof ServiceUnavailableException) { - return false; - } - return (ex.getCause() == null || neo4jServerRunning(ex.getCause())); - } - -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-redis/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-redis/build.gradle deleted file mode 100644 index 2d304c6c05b..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-redis/build.gradle +++ /dev/null @@ -1,12 +0,0 @@ -plugins { - id "java" - id "org.springframework.boot.conventions" -} - -description = "Spring Boot Data Redis smoke test" - -dependencies { - implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-data-redis")) - - testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-redis/src/main/java/smoketest/data/redis/SampleRedisApplication.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-redis/src/main/java/smoketest/data/redis/SampleRedisApplication.java deleted file mode 100644 index eb90dbb14cc..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-redis/src/main/java/smoketest/data/redis/SampleRedisApplication.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2012-2019 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package smoketest.data.redis; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.CommandLineRunner; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.data.redis.core.StringRedisTemplate; -import org.springframework.data.redis.core.ValueOperations; - -@SpringBootApplication -public class SampleRedisApplication implements CommandLineRunner { - - @Autowired - private StringRedisTemplate template; - - @Override - public void run(String... args) throws Exception { - ValueOperations ops = this.template.opsForValue(); - String key = "spring.boot.redis.test"; - if (!this.template.hasKey(key)) { - ops.set(key, "foo"); - } - System.out.println("Found key " + key + ", value=" + ops.get(key)); - } - - public static void main(String[] args) { - // Close the context so it doesn't stay awake listening for redis - SpringApplication.run(SampleRedisApplication.class, args).close(); - } - -} diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-redis/src/test/java/smoketest/data/redis/SampleRedisApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-redis/src/test/java/smoketest/data/redis/SampleRedisApplicationTests.java deleted file mode 100644 index b8915f0c845..00000000000 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-redis/src/test/java/smoketest/data/redis/SampleRedisApplicationTests.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2012-2019 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package smoketest.data.redis; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - -import org.springframework.boot.test.system.CapturedOutput; -import org.springframework.boot.test.system.OutputCaptureExtension; -import org.springframework.data.redis.RedisConnectionFailureException; - -import static org.assertj.core.api.Assertions.assertThat; - -/** - * Tests for {@link SampleRedisApplication}. - * - * @author Dave Syer - */ -@ExtendWith(OutputCaptureExtension.class) -class SampleRedisApplicationTests { - - @Test - void testDefaultSettings(CapturedOutput output) { - try { - SampleRedisApplication.main(new String[0]); - } - catch (Exception ex) { - if (!redisServerRunning(ex)) { - return; - } - } - assertThat(output).contains("Found key spring.boot.redis.test"); - } - - private boolean redisServerRunning(Throwable ex) { - System.out.println(ex.getMessage()); - if (ex instanceof RedisConnectionFailureException) { - return false; - } - return (ex.getCause() == null || redisServerRunning(ex.getCause())); - } - -}