Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 7a6567b

Browse files
committed
Give SCDF ability to compile and run tests to completion
* Disable tests that need more investigation * Refresh the TODO and Disable messages to reflect an accurate message of what is required * These changes do not include those for skipper * To compile to completion comment out spring-cloud-skipper module then execute mvn clean install Update code based on review
1 parent b81fa8e commit 7a6567b

File tree

27 files changed

+108
-133
lines changed

27 files changed

+108
-133
lines changed

spring-cloud-dataflow-aggregate-task/src/main/java/org/springframework/cloud/dataflow/aggregate/task/impl/AggregateDataFlowTaskExecutionQueryDao.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import java.sql.ResultSet;
1919
import java.sql.SQLException;
20+
import java.sql.Timestamp;
2021
import java.sql.Types;
2122
import java.util.ArrayList;
2223
import java.util.Collection;
@@ -484,11 +485,12 @@ public TaskExecution mapRow(ResultSet rs, int rowNum) throws SQLException {
484485
if (rs.wasNull()) {
485486
parentExecutionId = null;
486487
}
488+
Timestamp endTimestamp = rs.getTimestamp("END_TIME");
487489
return new TaskExecution(id,
488490
getNullableExitCode(rs),
489491
rs.getString("TASK_NAME"),
490492
rs.getTimestamp("START_TIME").toLocalDateTime(),
491-
rs.getTimestamp("END_TIME").toLocalDateTime(),
493+
(endTimestamp != null) ? endTimestamp.toLocalDateTime() : null,
492494
rs.getString("EXIT_MESSAGE"),
493495
getTaskArguments(id),
494496
rs.getString("ERROR_MESSAGE"),

spring-cloud-dataflow-autoconfigure/src/test/java/org/springframework/cloud/dataflow/autoconfigure/local/AbstractSchedulerPerPlatformTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import org.springframework.boot.cloud.CloudPlatform;
3030
import org.springframework.boot.test.context.SpringBootTest;
3131
import org.springframework.boot.test.mock.mockito.MockBean;
32+
import org.springframework.cloud.dataflow.aggregate.task.DataflowTaskExecutionQueryDao;
3233
import org.springframework.cloud.dataflow.aggregate.task.TaskDefinitionReader;
3334
import org.springframework.cloud.dataflow.aggregate.task.TaskDeploymentReader;
3435
import org.springframework.cloud.dataflow.registry.service.AppRegistryService;
@@ -77,6 +78,11 @@ public TaskDeploymentReader taskDeploymentReader() {
7778
return mock(TaskDeploymentReader.class);
7879
}
7980

81+
@Bean
82+
DataflowTaskExecutionQueryDao dataflowTaskExecutionQueryDao() {
83+
return mock(DataflowTaskExecutionQueryDao.class);
84+
}
85+
8086
@Configuration
8187
@ConditionalOnCloudPlatform(CloudPlatform.CLOUD_FOUNDRY)
8288
public static class CloudFoundryMockConfig {

spring-cloud-dataflow-rest-resource/src/main/java/org/springframework/cloud/dataflow/rest/support/jackson/JobParameterJacksonDeserializer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import java.time.LocalDateTime;
2121

2222
import com.fasterxml.jackson.core.JsonParser;
23-
import com.fasterxml.jackson.core.JsonProcessingException;
2423
import com.fasterxml.jackson.core.ObjectCodec;
2524
import com.fasterxml.jackson.databind.DeserializationContext;
2625
import com.fasterxml.jackson.databind.JsonDeserializer;
@@ -51,7 +50,7 @@ public JobParameter deserialize(JsonParser jsonParser, DeserializationContext de
5150
String type = node.get("type").asText();
5251

5352
JobParameter jobParameter;
54-
//TODO: Boot3x followup
53+
//TODO: Boot3x followup Verify that Job Parameters setup properly for Batch 5
5554
if (!type.isEmpty() && !type.equalsIgnoreCase("STRING")) {
5655
if ("DATE".equalsIgnoreCase(type)) {
5756
jobParameter = new JobParameter(LocalDateTime.parse(value), LocalDateTime.class, identifying);

spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/batch/JobRestartRuntimeException.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package org.springframework.cloud.dataflow.server.batch;
1818

19-
//TODO: Boot3x followup
2019
public class JobRestartRuntimeException extends RuntimeException {
2120

2221
public JobRestartRuntimeException(Long jobExecutionId, Exception cause) {

spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/batch/JobStartRuntimeException.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package org.springframework.cloud.dataflow.server.batch;
1818

19-
//TODO: Boot3x followup
2019
public class JobStartRuntimeException extends RuntimeException {
2120

2221
public JobStartRuntimeException(String jobName, Exception cause) {

spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/batch/JobStopException.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package org.springframework.cloud.dataflow.server.batch;
1818

19-
//TODO: Boot3x followup
2019
public class JobStopException extends RuntimeException {
2120

2221
public JobStopException(Long jobExecutionId, Exception cause) {

spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/AboutController.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
import org.apache.hc.client5.http.impl.io.BasicHttpClientConnectionManager;
2323
import org.apache.hc.client5.http.socket.ConnectionSocketFactory;
2424
import org.apache.hc.client5.http.socket.PlainConnectionSocketFactory;
25+
import org.apache.hc.client5.http.ssl.NoopHostnameVerifier;
2526
import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory;
2627
import org.apache.hc.core5.http.config.Lookup;
2728
import org.apache.hc.core5.http.config.RegistryBuilder;
28-
import org.apache.http.conn.ssl.NoopHostnameVerifier;
2929
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
3030
import org.apache.hc.client5.http.impl.classic.HttpClients;
3131
import org.slf4j.Logger;
@@ -47,6 +47,7 @@
4747
import org.springframework.cloud.dataflow.rest.resource.about.RuntimeEnvironmentDetails;
4848
import org.springframework.cloud.dataflow.rest.resource.about.SecurityInfo;
4949
import org.springframework.cloud.dataflow.rest.resource.about.VersionInfo;
50+
import org.springframework.cloud.dataflow.rest.util.HttpUtils;
5051
import org.springframework.cloud.dataflow.server.config.DataflowMetricsProperties;
5152
import org.springframework.cloud.dataflow.server.config.VersionInfoProperties;
5253
import org.springframework.cloud.dataflow.server.config.features.FeaturesProperties;
@@ -288,7 +289,10 @@ private String getChecksum(String defaultValue, String url,
288289
String version) {
289290
String result = defaultValue;
290291
if (result == null && StringUtils.hasText(url)) {
292+
ConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(HttpUtils.buildCertificateIgnoringSslContext(), NoopHostnameVerifier.INSTANCE);
293+
291294
Lookup<ConnectionSocketFactory> connSocketFactoryLookup = RegistryBuilder.<ConnectionSocketFactory> create()
295+
.register("https", sslsf)
292296
.register("http", new PlainConnectionSocketFactory())
293297
.build();
294298
CloseableHttpClient httpClient = HttpClients.custom()

spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/impl/DefaultTaskDeleteService.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,12 @@ public void cleanupExecutions(Set<TaskExecutionControllerDeleteAction> actionsAs
233233
.stream()
234234
.map(TaskExecution::getExecutionId)
235235
.collect(Collectors.toCollection(TreeSet::new));
236-
this.performDeleteTaskExecutions(childIds);
237-
this.performDeleteTaskExecutions(parentIds);
236+
if(childIds.size() > 0) {
237+
this.performDeleteTaskExecutions(childIds);
238+
}
239+
if(parentIds.size() > 0) {
240+
this.performDeleteTaskExecutions(parentIds);
241+
}
238242
}
239243
}
240244
}

spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/impl/DefaultTaskJobService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ public void restartJobExecution(long jobExecutionId) throws NoSuchJobExecutionEx
270270

271271
}
272272

273-
//TODO: Boot3x followup Remove boot2 check in this method once boot2 suuport code has been removed.
273+
//TODO: Boot3x followup Verify usage job params work with Batch 5.x
274274
/**
275275
* Apply identifying job parameters to arguments. There are cases (incrementers)
276276
* that add parameters to a job and thus must be added for each restart so that the

spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/controller/AboutControllerTests.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package org.springframework.cloud.dataflow.server.controller;
1818

1919
import org.junit.jupiter.api.BeforeEach;
20-
import org.junit.jupiter.api.Disabled;
2120
import org.junit.jupiter.api.Nested;
2221
import org.junit.jupiter.api.Test;
2322
import org.mockito.Mockito;
@@ -82,8 +81,6 @@ public void setupMocks() {
8281
.defaultRequest(get("/").accept(MediaType.APPLICATION_JSON)).build();
8382
}
8483

85-
//TODO: Boot3x followup
86-
@Disabled("Need to investigate why we can't get the RESTTemplate to resolve a https")
8784
@Test
8885
public void testListApplications() throws Exception {
8986
ResultActions result = mockMvc.perform(get("/about").accept(MediaType.APPLICATION_JSON)).andDo(print()).andExpect(status().isOk());
@@ -394,8 +391,6 @@ public void setupMocks() {
394391
.defaultRequest(get("/").accept(MediaType.APPLICATION_JSON)).build();
395392
}
396393

397-
//TODO: Boot3x followup
398-
@Disabled("Need to investigate why we can't get the RESTTemplate to resolve a https")
399394
@Test
400395
public void testAbout() throws Exception {
401396
ResultActions result = mockMvc.perform(get("/about").accept(MediaType.APPLICATION_JSON)).andDo(print()).andExpect(status().isOk());
@@ -422,8 +417,6 @@ public void testAbout() throws Exception {
422417
.andExpect(jsonPath("$.monitoringDashboardInfo.refreshInterval", is(30)));
423418
}
424419

425-
//TODO: Boot3x followup
426-
@Disabled("Need to investigate why we can't get the RESTTemplate to resolve a https")
427420
@Test
428421
public void testAboutWithMissingSkipper() throws Exception {
429422
reset(this.skipperClient);

spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/controller/JobExecutionControllerTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public void testStopStartedJobExecution() throws Exception {
146146
}
147147

148148
//TODO: Boot3x followup
149-
@Disabled("We need to investigate why SimpleJobService uses JSR-352 for the getJobNames")
149+
@Disabled("TODO: Boot3x followup We need to investigate why SimpleJobService uses JSR-352 for the getJobNames")
150150
@Test
151151
public void testStopStartedJobExecutionTwice() throws Exception {
152152
mockMvc.perform(put("/jobs/executions/6").accept(MediaType.APPLICATION_JSON).param("stop", "true"))
@@ -215,7 +215,7 @@ public void testGetAllExecutions() throws Exception {
215215
}
216216

217217
//TODO: Boot3x followup
218-
@Disabled("Until we implement the paging capabilities this tests is disabled.")
218+
@Disabled("TODO: Boot3x followup Until we implement the paging capabilities this tests is disabled.")
219219
@Test
220220
public void testGetAllExecutionsPageOffsetLargerThanIntMaxValue() throws Exception {
221221
verify5XXErrorIsThrownForPageOffsetError(get("/jobs/executions"));
@@ -234,7 +234,7 @@ public void testGetExecutionsByName() throws Exception {
234234
}
235235

236236
//TODO: Boot3x followup
237-
@Disabled("Until we implement the paging capabilities this tests is disabled.")
237+
@Disabled("TODO: Boot3x followup Until we implement the paging capabilities this tests is disabled.")
238238
@Test
239239
public void testGetExecutionsByNamePageOffsetLargerThanIntMaxValue() throws Exception {
240240
verify5XXErrorIsThrownForPageOffsetError(

spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/controller/JobStepExecutionControllerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public void testGetMultipleStepExecutions() throws Exception {
177177
}
178178

179179
//TODO: Boot3x followup
180-
@Disabled("Need to create DataflowSqlPagingQueryProvider so that dataflow can call generateJumpToItemQuery")
180+
@Disabled("TODO: Boot3x followup Need to create DataflowSqlPagingQueryProvider so that dataflow can call generateJumpToItemQuery")
181181
public void testSingleGetStepExecutionProgress() throws Exception {
182182
mockMvc.perform(get("/jobs/executions/1/steps/1/progress").accept(MediaType.APPLICATION_JSON))
183183
.andDo(print())

spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/controller/TaskExecutionControllerCleanupAsyncTests.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
import org.awaitility.Awaitility;
2727
import org.junit.jupiter.api.BeforeEach;
28-
import org.junit.jupiter.api.Disabled;
2928
import org.junit.jupiter.api.Test;
3029

3130
import org.springframework.beans.factory.annotation.Autowired;
@@ -116,8 +115,6 @@ public void setupMockMVC() {
116115
.defaultRequest(get("/").accept(MediaType.APPLICATION_JSON)).build();
117116
}
118117

119-
//TODO: Boot3x followup
120-
@Disabled("TODO: Boot3 followup")
121118
@Test
122119
void cleanupAll() throws Exception {
123120
String taskExecutionId = "asyncCleanupAllTaskExecId";

spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/controller/TaskExecutionControllerTests.java

Lines changed: 11 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
3030
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
3131
import org.junit.jupiter.api.BeforeEach;
32-
import org.junit.jupiter.api.Disabled;
3332
import org.junit.jupiter.api.Test;
3433

3534
import org.springframework.batch.core.JobExecution;
@@ -106,8 +105,6 @@
106105
* @author Corneil du Plessis
107106
*/
108107

109-
//TODO: Boot3x followup
110-
@Disabled("TODO: Boot3 followup after boot3/boot2 task changes are complete")
111108
@SpringBootTest(
112109
classes = { JobDependencies.class, TaskExecutionAutoConfiguration.class, DataflowAsyncAutoConfiguration.class,
113110
PropertyPlaceholderAutoConfiguration.class, BatchProperties.class})
@@ -378,7 +375,7 @@ void boot3Execution() throws Exception {
378375
mapper.registerModule(new Jackson2DataflowModule());
379376
LaunchResponseResource resource = mapper.readValue(response, LaunchResponseResource.class);
380377
resultActions = mockMvc.perform(
381-
get("/tasks/executions" + resource.getExecutionId())
378+
get("/tasks/executions/" + resource.getExecutionId())
382379
.accept(MediaType.APPLICATION_JSON))
383380
.andDo(print())
384381
.andExpect(status().isOk())
@@ -393,36 +390,10 @@ void boot3Execution() throws Exception {
393390
assertThat(json.findValue("deploymentProperties")).isNotNull();
394391
JsonNode deploymentProperties = json.findValue("deploymentProperties");
395392
System.out.println("deploymentProperties=" + deploymentProperties.toPrettyString());
396-
assertThat(deploymentProperties.hasNonNull("app.timestamp3.spring.cloud.task.tablePrefix")).isTrue();
397-
assertThat(deploymentProperties.get("app.timestamp3.spring.cloud.task.tablePrefix").asText()).isEqualTo("BOOT3_TASK_");
398393
}
399394

400395
@Test
401-
void invalidBoot3Execution() throws Exception {
402-
if (appRegistryService.getDefaultApp("timestamp3", ApplicationType.task) == null) {
403-
appRegistryService.save("timestamp3",
404-
ApplicationType.task,
405-
"3.0.0",
406-
new URI("file:src/test/resources/apps/foo-task"),
407-
null,
408-
AppBootSchemaVersion.BOOT3);
409-
}
410-
taskDefinitionRepository.save(new TaskDefinition("timestamp3", "timestamp3"));
411-
when(taskLauncher.launch(any())).thenReturn("abc");
412-
413-
ResultActions resultActions = mockMvc.perform(
414-
post("/tasks/executions")
415-
.queryParam("name", "timestamp3")
416-
.accept(MediaType.APPLICATION_JSON)
417-
).andDo(print())
418-
.andExpect(status().isBadRequest());
419-
420-
String response = resultActions.andReturn().getResponse().getContentAsString();
421-
assertThat(response).contains("cannot be launched for");
422-
}
423-
424-
@Test
425-
void boot2Execution() throws Exception {
396+
void bootExecution() throws Exception {
426397
if (appRegistryService.getDefaultApp("timestamp2", ApplicationType.task) == null) {
427398
appRegistryService.save("timestamp2",
428399
ApplicationType.task,
@@ -450,7 +421,7 @@ void boot2Execution() throws Exception {
450421
mapper.registerModule(new Jackson2DataflowModule());
451422
LaunchResponseResource resource = mapper.readValue(response, LaunchResponseResource.class);
452423
resultActions = mockMvc.perform(
453-
get("/tasks/executions" + resource.getExecutionId())
424+
get("/tasks/executions/" + resource.getExecutionId())
454425
.accept(MediaType.APPLICATION_JSON))
455426
.andDo(print())
456427
.andExpect(status().isOk())
@@ -465,15 +436,13 @@ void boot2Execution() throws Exception {
465436
assertThat(json.findValue("deploymentProperties")).isNotNull();
466437
JsonNode deploymentProperties = json.findValue("deploymentProperties");
467438
System.out.println("deploymentProperties=" + deploymentProperties.toPrettyString());
468-
assertThat(deploymentProperties.hasNonNull("app.timestamp2.spring.cloud.task.tablePrefix")).isTrue();
469-
assertThat(deploymentProperties.get("app.timestamp2.spring.cloud.task.tablePrefix").asText()).isEqualTo("TASK_");
470439

471440
}
472441

473442
@Test
474443
void getExecutionsByName() throws Exception {
475444
verifyTaskArgs(SAMPLE_CLEANSED_ARGUMENT_LIST, "$._embedded.taskExecutionResourceList[0].",
476-
mockMvc.perform(get("/tasks/executions/").param("name", TASK_NAME_ORIG).accept(MediaType.APPLICATION_JSON))
445+
mockMvc.perform(get("/tasks/executions").param("name", TASK_NAME_ORIG).accept(MediaType.APPLICATION_JSON))
477446
.andDo(print())
478447
.andExpect(status().isOk()))
479448
.andExpect(jsonPath("$._embedded.taskExecutionResourceList[0].taskName", is(TASK_NAME_ORIG)))
@@ -485,7 +454,7 @@ void getExecutionsByName() throws Exception {
485454

486455
@Test
487456
void getExecutionsByNameNotFound() throws Exception {
488-
mockMvc.perform(get("/tasks/executions/").param("name", "BAZ").accept(MediaType.APPLICATION_JSON))
457+
mockMvc.perform(get("/tasks/executions").param("name", "BAZ").accept(MediaType.APPLICATION_JSON))
489458
.andDo(print())
490459
.andExpect(status().is4xxClientError()).andReturn().getResponse().getContentAsString()
491460
.contains("NoSuchTaskException");
@@ -537,7 +506,7 @@ void cleanupByIdNotFound() throws Exception {
537506
@Test
538507
void deleteSingleTaskExecutionById() throws Exception {
539508
verifyTaskArgs(SAMPLE_CLEANSED_ARGUMENT_LIST, "$._embedded.taskExecutionResourceList[0].",
540-
mockMvc.perform(get("/tasks/executions/").accept(MediaType.APPLICATION_JSON))
509+
mockMvc.perform(get("/tasks/executions").accept(MediaType.APPLICATION_JSON))
541510
.andDo(print())
542511
.andExpect(status().isOk()))
543512
.andExpect(jsonPath("$._embedded.taskExecutionResourceList[*].executionId", containsInAnyOrder(4, 3, 2, 1)))
@@ -546,7 +515,7 @@ void deleteSingleTaskExecutionById() throws Exception {
546515
.andDo(print())
547516
.andExpect(status().isOk());
548517
verifyTaskArgs(SAMPLE_CLEANSED_ARGUMENT_LIST, "$._embedded.taskExecutionResourceList[0].",
549-
mockMvc.perform(get("/tasks/executions/").accept(MediaType.APPLICATION_JSON))
518+
mockMvc.perform(get("/tasks/executions").accept(MediaType.APPLICATION_JSON))
550519
.andDo(print())
551520
.andExpect(status().isOk()))
552521
.andExpect(jsonPath("$._embedded.taskExecutionResourceList[*].executionId", containsInAnyOrder(4, 3)))
@@ -561,7 +530,7 @@ void deleteSingleTaskExecutionById() throws Exception {
561530
@Test
562531
void deleteThreeTaskExecutionsById() throws Exception {
563532
verifyTaskArgs(SAMPLE_CLEANSED_ARGUMENT_LIST, "$._embedded.taskExecutionResourceList[0].",
564-
mockMvc.perform(get("/tasks/executions/").accept(MediaType.APPLICATION_JSON))
533+
mockMvc.perform(get("/tasks/executions").accept(MediaType.APPLICATION_JSON))
565534
.andDo(print())
566535
.andExpect(status().isOk()))
567536
.andExpect(jsonPath("$._embedded.taskExecutionResourceList[*].executionId", containsInAnyOrder(4, 3, 2, 1)))
@@ -570,7 +539,7 @@ void deleteThreeTaskExecutionsById() throws Exception {
570539
.andDo(print())
571540
.andExpect(status().isOk());
572541
verifyTaskArgs(SAMPLE_CLEANSED_ARGUMENT_LIST, "$._embedded.taskExecutionResourceList[0].",
573-
mockMvc.perform(get("/tasks/executions/").accept(MediaType.APPLICATION_JSON))
542+
mockMvc.perform(get("/tasks/executions").accept(MediaType.APPLICATION_JSON))
574543
.andDo(print())
575544
.andExpect(status().isOk()))
576545
.andExpect(jsonPath("$._embedded.taskExecutionResourceList[*].executionId", containsInAnyOrder(4)))
@@ -580,16 +549,13 @@ void deleteThreeTaskExecutionsById() throws Exception {
580549
@Test
581550
void deleteAllTaskExecutions() throws Exception {
582551
verifyTaskArgs(SAMPLE_CLEANSED_ARGUMENT_LIST, "$._embedded.taskExecutionResourceList[0].",
583-
mockMvc.perform(get("/tasks/executions/").accept(MediaType.APPLICATION_JSON))
584-
.andDo(print())
552+
mockMvc.perform(get("/tasks/executions").accept(MediaType.APPLICATION_JSON))
585553
.andExpect(status().isOk()))
586554
.andExpect(jsonPath("$._embedded.taskExecutionResourceList[*].executionId", containsInAnyOrder(4, 3, 2, 1)))
587555
.andExpect(jsonPath("$._embedded.taskExecutionResourceList", hasSize(4)));
588556
mockMvc.perform(delete("/tasks/executions").param("action", "CLEANUP,REMOVE_DATA"))
589-
.andDo(print())
590557
.andExpect(status().isOk());
591-
mockMvc.perform(get("/tasks/executions/").accept(MediaType.APPLICATION_JSON))
592-
.andDo(print())
558+
mockMvc.perform(get("/tasks/executions").accept(MediaType.APPLICATION_JSON))
593559
.andExpect(status().isOk())
594560
.andExpect(jsonPath("$.page.totalElements", is(0)));
595561
}
@@ -611,13 +577,6 @@ void sorting() throws Exception {
611577
.andDo(print())
612578
.andExpect(status().isOk());
613579

614-
mockMvc.perform(get("/tasks/executions").param("sort", "SCHEMA_TARGET").accept(MediaType.APPLICATION_JSON))
615-
.andDo(print())
616-
.andExpect(status().isOk());
617-
mockMvc.perform(get("/tasks/executions").param("sort", "schema_target").accept(MediaType.APPLICATION_JSON))
618-
.andDo(print())
619-
.andExpect(status().isOk());
620-
621580
mockMvc.perform(get("/tasks/executions").param("sort", "WRONG_FIELD").accept(MediaType.APPLICATION_JSON))
622581
.andDo(print())
623582
.andExpect(status().is5xxServerError())

0 commit comments

Comments
 (0)