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

Commit 7d07ee7

Browse files
onobcjvalkeal
authored andcommitted
Update tests to use latest version of artifacts as 1.0.0.BUILD-SNAPSHOT no longer exists
1 parent 660682d commit 7d07ee7

File tree

11 files changed

+46
-47
lines changed

11 files changed

+46
-47
lines changed

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -267,26 +267,26 @@ public void testRegisterAllFromFile() throws Exception {
267267
public void testRegisterAllWithoutForce() throws Exception {
268268
this.appRegistryService.importAll(false, new ClassPathResource("META-INF/test-apps-overwrite.properties"));
269269
assertThat(this.appRegistryService.find("time", ApplicationType.source).getUri().toString(),
270-
is("maven://org" + ".springframework.cloud.stream.app:time-source-rabbit:1.0.0.BUILD-SNAPSHOT"));
270+
is("maven://org" + ".springframework.cloud.stream.app:time-source-rabbit:3.2.0"));
271271
assertThat(this.appRegistryService.find("filter", ApplicationType.processor).getUri().toString(),
272-
is("maven://org" + ".springframework.cloud.stream.app:filter-processor-rabbit:1.0.0.BUILD-SNAPSHOT"));
272+
is("maven://org" + ".springframework.cloud.stream.app:filter-processor-rabbit:3.2.0"));
273273
assertThat(this.appRegistryService.find("log", ApplicationType.sink).getUri().toString(),
274-
is("maven://org.springframework" + ".cloud.stream.app:log-sink-rabbit:1.0.0.BUILD-SNAPSHOT"));
274+
is("maven://org.springframework" + ".cloud.stream.app:log-sink-rabbit:3.2.0"));
275275
assertThat(this.appRegistryService.find("timestamp", ApplicationType.task).getUri().toString(),
276-
is("maven://org" + ".springframework.cloud.task.app:timestamp-task:1.0.0.BUILD-SNAPSHOT"));
276+
is("maven://org" + ".springframework.cloud.task.app:timestamp-task:3.2.0"));
277277
}
278278

279279
@Test
280280
public void testRegisterAllWithForce() throws Exception {
281281
this.appRegistryService.importAll(true, new ClassPathResource("META-INF/test-apps-overwrite.properties"));
282282
assertThat(this.appRegistryService.find("time", ApplicationType.source).getUri().toString(),
283-
is("maven://org" + ".springframework.cloud.stream.app:time-source-kafka:1.0.0.BUILD-SNAPSHOT"));
283+
is("maven://org" + ".springframework.cloud.stream.app:time-source-kafka:3.2.0"));
284284
assertThat(this.appRegistryService.find("filter", ApplicationType.processor).getUri().toString(),
285-
is("maven://org" + ".springframework.cloud.stream.app:filter-processor-kafka:1.0.0.BUILD-SNAPSHOT"));
285+
is("maven://org" + ".springframework.cloud.stream.app:filter-processor-kafka:3.2.0"));
286286
assertThat(this.appRegistryService.find("log", ApplicationType.sink).getUri().toString(),
287-
is("maven://org.springframework" + ".cloud.stream.app:log-sink-kafka:1.0.0.BUILD-SNAPSHOT"));
287+
is("maven://org.springframework" + ".cloud.stream.app:log-sink-kafka:3.2.0"));
288288
assertThat(this.appRegistryService.find("timestamp", ApplicationType.task).getUri().toString(),
289-
is("maven://org" + ".springframework.cloud.task.app:timestamp-overwrite-task:1.0.0.BUILD-SNAPSHOT"));
289+
is("maven://org" + ".springframework.cloud.task.app:timestamp-overwrite-task:3.2.0"));
290290
}
291291

292292
@Test
@@ -368,15 +368,15 @@ public void testListSingleApplication() throws Exception {
368368
mockMvc.perform(get("/apps/source/time").accept(MediaType.APPLICATION_JSON)).andDo(print())
369369
.andExpect(status().isOk()).andExpect(jsonPath("name", is("time")))
370370
.andExpect(jsonPath("type", is("source")))
371-
.andExpect(jsonPath("$.options[*]", hasSize(6)));
371+
.andExpect(jsonPath("$.options[*]", hasSize(1)));
372372
}
373373

374374
@Test
375375
public void testListSingleApplicationExhaustive() throws Exception {
376376
mockMvc.perform(get("/apps/source/time?exhaustive=true").accept(MediaType.APPLICATION_JSON))
377377
.andExpect(status().isOk()).andExpect(jsonPath("name", is("time")))
378378
.andExpect(jsonPath("type", is("source")))
379-
.andExpect(jsonPath("$.options[*]", hasSize(905)));
379+
.andExpect(jsonPath("$.options[*]", hasSize(2001)));
380380
}
381381

382382
@Test
@@ -425,11 +425,11 @@ public void testUnregisterApplicationUsedInStream() throws Exception {
425425
.andExpect(status().isConflict());
426426

427427
// This log sink v1.0.BS is part of a deployed stream, so it can be unregistered
428-
mockMvc.perform(delete("/apps/sink/log/1.0.0.BUILD-SNAPSHOT").accept(MediaType.APPLICATION_JSON))
428+
mockMvc.perform(delete("/apps/sink/log/3.2.0").accept(MediaType.APPLICATION_JSON))
429429
.andExpect(status().isOk());
430430

431431
// This time source v1.0 BS is not part of a deployed stream, so it can be unregistered
432-
mockMvc.perform(delete("/apps/source/time/1.0.0.BUILD-SNAPSHOT").accept(MediaType.APPLICATION_JSON))
432+
mockMvc.perform(delete("/apps/source/time/3.2.0").accept(MediaType.APPLICATION_JSON))
433433
.andExpect(status().isOk());
434434

435435
// This time source is part of a deployed stream, so it can not be unregistered.
@@ -567,11 +567,11 @@ public void testUnregisterApplicationUsedInStreamNotDeployed() throws Exception
567567
.andExpect(status().isOk());
568568

569569
// This log sink v1.0.BS is part of a deployed stream, so it can be unregistered
570-
mockMvc.perform(delete("/apps/sink/log/1.0.0.BUILD-SNAPSHOT").accept(MediaType.APPLICATION_JSON))
570+
mockMvc.perform(delete("/apps/sink/log/3.2.0").accept(MediaType.APPLICATION_JSON))
571571
.andExpect(status().isOk());
572572

573573
// This time source v1.0 BS is not part of a deployed stream, so it can be unregistered
574-
mockMvc.perform(delete("/apps/source/time/1.0.0.BUILD-SNAPSHOT").accept(MediaType.APPLICATION_JSON))
574+
mockMvc.perform(delete("/apps/source/time/3.2.0").accept(MediaType.APPLICATION_JSON))
575575
.andExpect(status().isOk());
576576

577577
// This time source is part of a deployed stream, so it can not be unregistered.
@@ -671,17 +671,17 @@ public void testPagination() throws Exception {
671671

672672
@Test
673673
public void testListApplicationsByVersion() throws Exception {
674-
mockMvc.perform(get("/apps?version=1.0.0.BUILD-SNAPSHOT").accept(MediaType.APPLICATION_JSON))
674+
mockMvc.perform(get("/apps?version=3.2.0").accept(MediaType.APPLICATION_JSON))
675675
.andExpect(status().isOk())
676676
.andExpect(jsonPath("_embedded.appRegistrationResourceList", hasSize(4)));
677677
}
678678

679679
@Test
680680
public void testListApplicationsByVersionAndSearch() throws Exception {
681-
mockMvc.perform(get("/apps?version=1.0.0.BUILD-SNAPSHOT&search=time").accept(MediaType.APPLICATION_JSON)).andDo(print())
681+
mockMvc.perform(get("/apps?version=3.2.0&search=time").accept(MediaType.APPLICATION_JSON)).andDo(print())
682682
.andExpect(status().isOk())
683683
.andExpect(jsonPath("_embedded.appRegistrationResourceList", hasSize(2)));
684-
mockMvc.perform(get("/apps?version=1.0.0.BUILD-SNAPSHOT&search=timestamp").accept(MediaType.APPLICATION_JSON)).andDo(print())
684+
mockMvc.perform(get("/apps?version=3.2.0&search=timestamp").accept(MediaType.APPLICATION_JSON)).andDo(print())
685685
.andExpect(status().isOk())
686686
.andExpect(jsonPath("_embedded.appRegistrationResourceList", hasSize(1)));
687687
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ public void testRetrieveDeletedAppsAuditData() throws Exception {
339339
.andExpect(status().isOk())
340340
.andExpect(jsonPath("$._embedded.auditRecordResourceList.*", hasSize(9)));
341341

342-
appRegistryService.delete("filter", ApplicationType.processor, "1.0.0.BUILD-SNAPSHOT");
342+
appRegistryService.delete("filter", ApplicationType.processor, "3.2.0");
343343

344344
mockMvc.perform(
345345
get("/audit-records?operations=APP_REGISTRATION&actions=DELETE").accept(MediaType.APPLICATION_JSON))
@@ -449,7 +449,7 @@ public void testRetrieveUpdatedAppsAuditData() throws Exception {
449449
.andExpect(status().isOk())
450450
.andExpect(jsonPath("$._embedded.auditRecordResourceList.*", hasSize(4)));
451451

452-
AppRegistration filter = appRegistryService.find("filter", ApplicationType.processor, "1.0.0.BUILD-SNAPSHOT");
452+
AppRegistration filter = appRegistryService.find("filter", ApplicationType.processor, "3.2.0");
453453
appRegistryService.save(filter);
454454

455455
mockMvc.perform(

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -859,8 +859,7 @@ public void testStreamWithShortformProperties() throws Exception {
859859
assertThat(logSpec.getApplicationProperties().get("level")).isNull();
860860

861861
SpringCloudDeployerApplicationSpec timeSpec = parseSpec(timePackage.getConfigValues().getRaw());
862-
assertThat(timeSpec.getApplicationProperties().get("trigger.fixed-delay")).isEqualTo("2");
863-
assertThat(timeSpec.getApplicationProperties().get("fixed-delay")).isNull();
862+
assertThat(timeSpec.getApplicationProperties().get("fixed-delay")).isEqualTo("2");
864863
}
865864

866865
@Test
@@ -893,7 +892,7 @@ public void testDeployWithAppPropertiesOverride() throws Exception {
893892
assertThat(logSpec.getDeploymentProperties().get(AppDeployer.INDEXED_PROPERTY_KEY)).isEqualTo("true");
894893

895894
SpringCloudDeployerApplicationSpec timeSpec = parseSpec(timePackage.getConfigValues().getRaw());
896-
assertThat(timeSpec.getApplicationProperties().get("trigger.fixed-delay")).isEqualTo("4");
895+
assertThat(timeSpec.getApplicationProperties().get("fixed-delay")).isEqualTo("4");
897896
}
898897

899898
@Test
@@ -924,7 +923,7 @@ public void testDeployWithAppPropertiesOverrideWithLabel() throws Exception {
924923
assertThat(logSpec.getApplicationProperties().get("log.level")).isEqualTo("ERROR");
925924

926925
SpringCloudDeployerApplicationSpec timeSpec = parseSpec(timePackage.getConfigValues().getRaw());
927-
assertThat(timeSpec.getApplicationProperties().get("trigger.fixed-delay")).isEqualTo("4");
926+
assertThat(timeSpec.getApplicationProperties().get("fixed-delay")).isEqualTo("4");
928927
}
929928

930929
@Test

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ public void testShowStreamInfo() {
171171
streamDeploymentProperties.put("time", deploymentProperties1);
172172
streamDeploymentProperties.put("log", deploymentProperties2);
173173
Map<String, String> appVersions = new HashMap<>();
174-
appVersions.put("time", "1.0.0.BUILD-SNAPSHOT");
175-
appVersions.put("log", "1.0.0.BUILD-SNAPSHOT");
174+
appVersions.put("time", "3.2.0");
175+
appVersions.put("log", "3.2.0");
176176
StreamDefinition streamDefinition = new StreamDefinition("testStream1", "time | log");
177177
StreamDeployment streamDeployment = new StreamDeployment(streamDefinition.getName(),
178178
new JSONObject(streamDeploymentProperties).toString());

spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/service/impl/DefaultStreamServiceUpdateTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public class DefaultStreamServiceUpdateTests {
8282
@Test
8383
public void testCreateUpdateRequestsWithRegisteredApp() throws IOException {
8484
this.appRegistryService.save("log", ApplicationType.sink, "1.1.1.RELEASE",
85-
URI.create("maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:1.0.0.BUILD-SNAPSHOT"),
85+
URI.create("maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:3.2.0"),
8686
null);
8787
testCreateUpdateRequests();
8888
}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
source.time=maven://org.springframework.cloud.stream.app:time-source-kafka:1.0.0.BUILD-SNAPSHOT
2-
source.time.metadata=maven://org.springframework.cloud.stream.app:time-source-kafka:1.0.0.BUILD-SNAPSHOT
3-
processor.filter=maven://org.springframework.cloud.stream.app:filter-processor-kafka:1.0.0.BUILD-SNAPSHOT
4-
processor.filter.metadata=maven://org.springframework.cloud.stream.app:filter-processor-kafka:1.0.0.BUILD-SNAPSHOT
5-
sink.log=maven://org.springframework.cloud.stream.app:log-sink-kafka:1.0.0.BUILD-SNAPSHOT
6-
sink.log.metadata=maven://org.springframework.cloud.stream.app:log-sink-kafka:1.0.0.BUILD-SNAPSHOT
7-
task.timestamp=maven://org.springframework.cloud.task.app:timestamp-overwrite-task:1.0.0.BUILD-SNAPSHOT
8-
task.timestamp.metadata=maven://org.springframework.cloud.task.app:timestamp-overwrite-task:1.0.0.BUILD-SNAPSHOT
1+
source.time=maven://org.springframework.cloud.stream.app:time-source-kafka:3.2.0
2+
source.time.metadata=maven://org.springframework.cloud.stream.app:time-source-kafka:3.2.0
3+
processor.filter=maven://org.springframework.cloud.stream.app:filter-processor-kafka:3.2.0
4+
processor.filter.metadata=maven://org.springframework.cloud.stream.app:filter-processor-kafka:3.2.0
5+
sink.log=maven://org.springframework.cloud.stream.app:log-sink-kafka:3.2.0
6+
sink.log.metadata=maven://org.springframework.cloud.stream.app:log-sink-kafka:3.2.0
7+
task.timestamp=maven://org.springframework.cloud.task.app:timestamp-overwrite-task:3.2.0
8+
task.timestamp.metadata=maven://org.springframework.cloud.task.app:timestamp-overwrite-task:3.2.0
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
source.time=maven://org.springframework.cloud.stream.app:time-source-rabbit:1.0.0.BUILD-SNAPSHOT
2-
source.time.metadata=maven://org.springframework.cloud.stream.app:time-source-rabbit:1.0.0.BUILD-SNAPSHOT
3-
processor.filter=maven://org.springframework.cloud.stream.app:filter-processor-rabbit:1.0.0.BUILD-SNAPSHOT
4-
processor.filter.metadata=maven://org.springframework.cloud.stream.app:filter-processor-rabbit:1.0.0.BUILD-SNAPSHOT
5-
sink.log=maven://org.springframework.cloud.stream.app:log-sink-rabbit:1.0.0.BUILD-SNAPSHOT
6-
sink.log.metadata=maven://org.springframework.cloud.stream.app:log-sink-rabbit:1.0.0.BUILD-SNAPSHOT
7-
task.timestamp=maven://org.springframework.cloud.task.app:timestamp-task:1.0.0.BUILD-SNAPSHOT
8-
task.timestamp.metadata=maven://org.springframework.cloud.task.app:timestamp-task:1.0.0.BUILD-SNAPSHOT
1+
source.time=maven://org.springframework.cloud.stream.app:time-source-rabbit:3.2.0
2+
source.time.metadata=maven://org.springframework.cloud.stream.app:time-source-rabbit:3.2.0
3+
processor.filter=maven://org.springframework.cloud.stream.app:filter-processor-rabbit:3.2.0
4+
processor.filter.metadata=maven://org.springframework.cloud.stream.app:filter-processor-rabbit:3.2.0
5+
sink.log=maven://org.springframework.cloud.stream.app:log-sink-rabbit:3.2.0
6+
sink.log.metadata=maven://org.springframework.cloud.stream.app:log-sink-rabbit:3.2.0
7+
task.timestamp=maven://org.springframework.cloud.task.app:timestamp-task:3.2.0
8+
task.timestamp.metadata=maven://org.springframework.cloud.task.app:timestamp-task:3.2.0
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
source.time=maven://org.springframework.cloud.stream.app:time-source-rabbit:1.0.0.BUILD-SNAPSHOT
2-
sink.log=maven://org.springframework.cloud.stream.app:log-sink-rabbit:1.0.0.BUILD-SNAPSHOT
1+
source.time=maven://org.springframework.cloud.stream.app:time-source-rabbit:3.2.0
2+
sink.log=maven://org.springframework.cloud.stream.app:log-sink-rabbit:3.2.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
task.timestamp=maven://org.springframework.cloud.task.app:timestamp-task:1.0.0.BUILD-SNAPSHOT
1+
task.timestamp=maven://io.spring:timestamp-task:2.0.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
app register --type sink --force true --name log --uri maven://org.springframework.cloud.stream.app:log-sink-rabbit:1.0.0.BUILD-SNAPSHOT
1+
app register --type sink --force true --name log --uri maven://org.springframework.cloud.stream.app:log-sink-rabbit:3.2.0

0 commit comments

Comments
 (0)