|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/*
|
|
|
|
|
* Copyright 2012-2019 the original author or authors.
|
|
|
|
|
* 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.
|
|
|
|
@ -49,20 +49,12 @@ class SampleIntegrationParentApplicationTests {
|
|
|
|
|
void testVanillaExchange(@TempDir Path temp) throws Exception {
|
|
|
|
|
File inputDir = new File(temp.toFile(), "input");
|
|
|
|
|
File outputDir = new File(temp.toFile(), "output");
|
|
|
|
|
ConfigurableApplicationContext app = SpringApplication.run(SampleParentContextApplication.class,
|
|
|
|
|
"--service.input-dir=" + inputDir, "--service.output-dir=" + outputDir);
|
|
|
|
|
try {
|
|
|
|
|
ConfigurableApplicationContext producer = SpringApplication.run(ProducerApplication.class,
|
|
|
|
|
"--service.input-dir=" + inputDir, "--service.output-dir=" + outputDir, "World");
|
|
|
|
|
try {
|
|
|
|
|
try (ConfigurableApplicationContext app = SpringApplication.run(SampleParentContextApplication.class,
|
|
|
|
|
"--service.input-dir=" + inputDir, "--service.output-dir=" + outputDir)) {
|
|
|
|
|
try (ConfigurableApplicationContext producer = SpringApplication.run(ProducerApplication.class,
|
|
|
|
|
"--service.input-dir=" + inputDir, "--service.output-dir=" + outputDir, "World")) {
|
|
|
|
|
awaitOutputContaining(outputDir, "Hello World");
|
|
|
|
|
}
|
|
|
|
|
finally {
|
|
|
|
|
producer.close();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
finally {
|
|
|
|
|
app.close();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|