Skip to content

Commit 04df1cf

Browse files
pivovaritmaibin
authored andcommitted
Remove spring-flyway (eugenp#3240)
* Remove spring-flyway * Remove spring-flyway
1 parent 18c8747 commit 04df1cf

19 files changed

Lines changed: 2 additions & 422 deletions

core-java-concurrency/src/test/java/com/baeldung/concurrent/executorservice/WaitingForThreadsToFinishTest.java renamed to core-java-concurrency/src/test/java/com/baeldung/concurrent/executorservice/WaitingForThreadsToFinishManualTest.java

Lines changed: 2 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
import static junit.framework.TestCase.assertTrue;
1212

13-
public class WaitingForThreadsToFinishTest {
13+
public class WaitingForThreadsToFinishManualTest {
1414

15-
private static final Logger LOG = LoggerFactory.getLogger(WaitingForThreadsToFinishTest.class);
15+
private static final Logger LOG = LoggerFactory.getLogger(WaitingForThreadsToFinishManualTest.class);
1616
private final static ExecutorService WORKER_THREAD_POOL = Executors.newFixedThreadPool(10);
1717

1818
public void awaitTerminationAfterShutdown(ExecutorService threadPool) {
@@ -142,66 +142,4 @@ public void givenMultipleThreads_whenUsingCompletionService_thenMainThreadShould
142142
awaitTerminationAfterShutdown(WORKER_THREAD_POOL);
143143
}
144144
}
145-
146-
@Test
147-
public void givenMultipleThreads_whenUsingCompletableFutures_thenMainThreadShouldWaitForAllToFinish() {
148-
149-
CompletableFuture<String> future1 = CompletableFuture.supplyAsync(() -> {
150-
151-
try {
152-
Thread.sleep(1000);
153-
} catch (InterruptedException e) {
154-
e.printStackTrace();
155-
}
156-
157-
return "Hello";
158-
});
159-
160-
CompletableFuture<String> future2 = CompletableFuture.supplyAsync(() -> {
161-
162-
try {
163-
Thread.sleep(5000);
164-
} catch (InterruptedException e) {
165-
e.printStackTrace();
166-
}
167-
168-
return "Beautiful";
169-
});
170-
171-
CompletableFuture<String> future3 = CompletableFuture.supplyAsync(() -> {
172-
173-
try {
174-
Thread.sleep(3000);
175-
} catch (InterruptedException e) {
176-
e.printStackTrace();
177-
}
178-
179-
return "World";
180-
});
181-
182-
long startProcessingTime = System.currentTimeMillis();
183-
CompletableFuture<Void> combinedFuture = CompletableFuture.allOf(future1, future2, future3);
184-
combinedFuture.join();
185-
186-
long totalProcessingTime = System.currentTimeMillis() - startProcessingTime;
187-
assertTrue(totalProcessingTime >= 5000 && totalProcessingTime < 6000);
188-
189-
LOG.debug("Responses from all threads are available after " + totalProcessingTime + " milliseconds");
190-
191-
try {
192-
String thread1Response = future1.get();
193-
assertTrue(thread1Response.equals("Hello"));
194-
195-
String thread2Response = future2.get();
196-
assertTrue(thread2Response.equals("Beautiful"));
197-
198-
String thread3Response = future3.get();
199-
assertTrue(thread3Response.equals("World"));
200-
201-
} catch (InterruptedException | ExecutionException e) {
202-
e.printStackTrace();
203-
}
204-
205-
awaitTerminationAfterShutdown(WORKER_THREAD_POOL);
206-
}
207145
}

flyway/pom.xml

Lines changed: 0 additions & 52 deletions
This file was deleted.

flyway/spring-flyway/.gitignore

Lines changed: 0 additions & 24 deletions
This file was deleted.

flyway/spring-flyway/pom.xml

Lines changed: 0 additions & 57 deletions
This file was deleted.

flyway/spring-flyway/src/main/java/com/baeldung/springflyway/SpringFlywayApplication.java

Lines changed: 0 additions & 12 deletions
This file was deleted.

flyway/spring-flyway/src/main/java/com/baeldung/springflyway/entities/Customer.java

Lines changed: 0 additions & 28 deletions
This file was deleted.

flyway/spring-flyway/src/main/java/com/baeldung/springflyway/migration/V2__uk_lastname_customer.java

Lines changed: 0 additions & 14 deletions
This file was deleted.

flyway/spring-flyway/src/main/java/com/baeldung/springflyway/repositories/CustomerRepository.java

Lines changed: 0 additions & 11 deletions
This file was deleted.

flyway/spring-flyway/src/test/java/com/baeldung/springflyway/CustomerRepositoryInitialMigrationIntegrationTest.java

Lines changed: 0 additions & 28 deletions
This file was deleted.

flyway/spring-flyway/src/test/java/com/baeldung/springflyway/CustomerRepositoryInsertDataIntegrationTest.java

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)