Revert to snapshots

This commit is contained in:
Dave Syer
2018-02-20 19:25:58 +00:00
parent 72efd58675
commit a2a2932715
43 changed files with 75 additions and 75 deletions

View File

@@ -22,14 +22,14 @@ $ curl localhost:8080/admin
Deploy a sample like this:
```
$ curl localhost:8080/admin/pojos -d path=maven://com.example:function-sample-pojo:1.0.0.M4
$ curl localhost:8080/admin/pojos -d path=maven://com.example:function-sample-pojo:1.0.0.BUILD-SNAPSHOT
{"id":"81c568e36c7909ec1dd841aa7ee6d3e3"}
```
(takes about 500ms, once the local Maven cache is warm). Deploy another one:
```
$ curl localhost:8080/admin/sample -d path=maven://com.example:function-sample:1.0.0.M4
$ curl localhost:8080/admin/sample -d path=maven://com.example:function-sample:1.0.0.BUILD-SNAPSHOT
{"id":"cb2fdb3130f6349f143f4686848ea90f"}
```
@@ -37,14 +37,14 @@ Undeploy the first one:
```
$ curl localhost:8080/admin/pojos -X DELETE
{"name":"81c568e36c7909ec1dd841aa7ee6d3e3","id":"pojos","path":"maven://com.example:function-sample-pojo:1.0.0.M4"}
{"name":"81c568e36c7909ec1dd841aa7ee6d3e3","id":"pojos","path":"maven://com.example:function-sample-pojo:1.0.0.BUILD-SNAPSHOT"}
```
List the deployed apps:
```
$ curl localhost:8080/admin
{"sample":{"name":"sample","id":"cb2fdb3130f6349f143f4686848ea90","path":"maven://com.example:function-sample:1.0.0.M4"}}
{"sample":{"name":"sample","id":"cb2fdb3130f6349f143f4686848ea90","path":"maven://com.example:function-sample:1.0.0.BUILD-SNAPSHOT"}}
```
Send an event to one of the functions:

View File

@@ -11,7 +11,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-function-parent</artifactId>
<version>1.0.0.M4</version>
<version>1.0.0.BUILD-SNAPSHOT</version>
</parent>
<properties>

View File

@@ -11,5 +11,5 @@ exclusions.spring-boot-starter-actuator: org.springframework.boot:spring-boot-st
dependencies.spring-web: org.springframework:spring-web
dependencies.jackson-databind: com.fasterxml.jackson.core:jackson-databind
dependencies.spring-boot-starter: org.springframework.boot:spring-boot-starter
dependencies.spring-cloud-function-context: org.springframework.cloud:spring-cloud-function-context:1.0.0.M4
dependencies.spring-cloud-function-context: org.springframework.cloud:spring-cloud-function-context:1.0.0.BUILD-SNAPSHOT

View File

@@ -58,7 +58,7 @@ public class FunctionAppDeployerTests {
public static void skip() {
try {
ArchiveUtils.getArchiveRoot(ArchiveUtils
.getArchive("maven://io.spring.sample:function-sample:1.0.0.M4"));
.getArchive("maven://io.spring.sample:function-sample:1.0.0.BUILD-SNAPSHOT"));
}
catch (Exception e) {
Assume.assumeNoException(
@@ -84,7 +84,7 @@ public class FunctionAppDeployerTests {
@Test
public void web() throws Exception {
String first = deploy("maven://io.spring.sample:function-sample:1.0.0.M4", "",
String first = deploy("maven://io.spring.sample:function-sample:1.0.0.BUILD-SNAPSHOT", "",
"--spring.cloud.function.stream.supplier.enabled=false");
// Deployment is blocking so it either failed or succeeded.
assertThat(deployer.status(first).getState()).isEqualTo(DeploymentState.deployed);
@@ -93,7 +93,7 @@ public class FunctionAppDeployerTests {
@Test
public void stream() throws Exception {
String first = deploy("maven://io.spring.sample:function-sample:1.0.0.M4",
String first = deploy("maven://io.spring.sample:function-sample:1.0.0.BUILD-SNAPSHOT",
"spring.cloud.deployer.thin.profile=rabbit",
"--spring.cloud.function.stream.supplier.enabled=false", "--debug=true");
// Deployment is blocking so it either failed or succeeded.

View File

@@ -45,7 +45,7 @@ public class FunctionExtractingFunctionCatalogIntegrationTests {
// System.setProperty("debug", "true");
context = new ApplicationRunner().start("--server.port=" + port, "--debug",
"--logging.level.org.springframework.cloud.function=DEBUG");
deploy("sample", "maven://io.spring.sample:function-sample-pojo:1.0.0.M4");
deploy("sample", "maven://io.spring.sample:function-sample-pojo:1.0.0.BUILD-SNAPSHOT");
}
private static void deploy(String name, String path) throws Exception {
@@ -101,7 +101,7 @@ public class FunctionExtractingFunctionCatalogIntegrationTests {
@Test
public void another() throws Exception {
deploy("strings", "maven://io.spring.sample:function-sample:1.0.0.M4");
deploy("strings", "maven://io.spring.sample:function-sample:1.0.0.BUILD-SNAPSHOT");
assertThat(new TestRestTemplate().getForObject(
"http://localhost:" + port + "/stream/strings/words", String.class))
.isEqualTo("[\"foo\",\"bar\"]");
@@ -112,12 +112,12 @@ public class FunctionExtractingFunctionCatalogIntegrationTests {
String undeploy = undeploy("sample");
assertThat(undeploy.contains("\"name\":\"sample\""));
assertThat(undeploy.contains(
"\"path\":\"maven://io.spring.sample:function-sample-pojo:1.0.0.M4\""));
"\"path\":\"maven://io.spring.sample:function-sample-pojo:1.0.0.BUILD-SNAPSHOT\""));
ResponseEntity<String> result = new TestRestTemplate().exchange(RequestEntity
.get(new URI("http://localhost:" + port + "/stream/sample/words"))
.build(), String.class);
assertThat(result.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND);
deploy("sample", "maven://io.spring.sample:function-sample-pojo:1.0.0.M4");
deploy("sample", "maven://io.spring.sample:function-sample-pojo:1.0.0.BUILD-SNAPSHOT");
assertThat(new TestRestTemplate().postForObject(
"http://localhost:" + port + "/stream/sample/uppercase",
"{\"value\":\"foo\"}", String.class)).isEqualTo("{\"value\":\"FOO\"}");

View File

@@ -47,10 +47,10 @@ public class FunctionExtractingFunctionCatalogTests {
@Before
public void init() throws Exception {
if (id == null) {
deploy("sample", "maven://io.spring.sample:function-sample:1.0.0.M4");
deploy("sample", "maven://io.spring.sample:function-sample:1.0.0.BUILD-SNAPSHOT");
// "--debug");
id = deploy("pojos",
"maven://io.spring.sample:function-sample-pojo:1.0.0.M4");
"maven://io.spring.sample:function-sample-pojo:1.0.0.BUILD-SNAPSHOT");
}
}