Updated to files to fit the Standard.
This commit is contained in:
@@ -32,4 +32,5 @@ public class TaskSinkApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(TaskSinkApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -53,30 +53,26 @@ public class TaskSinkApplicationTests {
|
||||
@Test
|
||||
public void testLaunch() {
|
||||
|
||||
TaskLauncher testTaskLauncher =
|
||||
this.context.getBean(TaskLauncher.class);
|
||||
TaskLauncher testTaskLauncher = this.context.getBean(TaskLauncher.class);
|
||||
|
||||
Map<String, String> properties = new HashMap();
|
||||
properties.put("server.port", "0");
|
||||
TaskLaunchRequest request = new TaskLaunchRequest(
|
||||
"maven://org.springframework.cloud.task.app:"
|
||||
+ "timestamp-task:jar:1.0.1.RELEASE", null, properties,
|
||||
null, null);
|
||||
"maven://org.springframework.cloud.task.app:" + "timestamp-task:jar:1.0.1.RELEASE", null, properties,
|
||||
null, null);
|
||||
GenericMessage<TaskLaunchRequest> message = new GenericMessage<>(request);
|
||||
this.streamBridge.send("taskLauncherSink-in-0", message);
|
||||
|
||||
ArgumentCaptor<AppDeploymentRequest> deploymentRequest = ArgumentCaptor
|
||||
.forClass(AppDeploymentRequest.class);
|
||||
ArgumentCaptor<AppDeploymentRequest> deploymentRequest = ArgumentCaptor.forClass(AppDeploymentRequest.class);
|
||||
|
||||
verify(testTaskLauncher).launch(deploymentRequest.capture());
|
||||
|
||||
AppDeploymentRequest actualRequest = deploymentRequest.getValue();
|
||||
|
||||
assertThat(actualRequest.getCommandlineArguments().isEmpty()).isTrue();
|
||||
assertThat(actualRequest.getDefinition().getProperties()
|
||||
.get("server.port")).isEqualTo("0");
|
||||
assertThat(actualRequest.getDefinition().getProperties().get("server.port")).isEqualTo("0");
|
||||
assertThat(actualRequest.getResource().toString()
|
||||
.contains("org.springframework.cloud.task.app:timestamp-task:jar:1.0.1.RELEASE"))
|
||||
.isTrue();
|
||||
.contains("org.springframework.cloud.task.app:timestamp-task:jar:1.0.1.RELEASE")).isTrue();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user