Updated to files to fit the Standard.

This commit is contained in:
Glenn Renfro
2022-07-25 11:41:43 -04:00
parent 39908bb499
commit 76a5d12136
200 changed files with 2839 additions and 4125 deletions

View File

@@ -32,4 +32,5 @@ public class TaskSinkApplication {
public static void main(String[] args) {
SpringApplication.run(TaskSinkApplication.class, args);
}
}

View File

@@ -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();
}
}