Revert to snaphots

This commit is contained in:
Dave Syer
2018-03-16 11:40:12 -04:00
parent feb8f51c41
commit efc99d2af0
43 changed files with 67 additions and 67 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.M5
$ 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.M5
$ 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.M5"}
{"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.M5"}}
{"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.M5</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.M5
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.M5"));
.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.M5", "",
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.M5",
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

@@ -46,7 +46,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:1.0.0.M5");
deploy("sample", "maven://io.spring.sample:function-sample:1.0.0.BUILD-SNAPSHOT");
}
private static void deploy(String name, String path) throws Exception {
@@ -105,7 +105,7 @@ public class FunctionExtractingFunctionCatalogIntegrationTests {
@Test
public void another() throws Exception {
deploy("pof",
"maven://io.spring.sample:function-sample-pof:jar:exec:1.0.0.M5");
"maven://io.spring.sample:function-sample-pof:jar:exec:1.0.0.BUILD-SNAPSHOT");
assertThat(new TestRestTemplate().postForObject(
"http://localhost:" + port + "/stream/pof/greeter", "Foo",
String.class)).isEqualTo("Hello Foo");
@@ -116,12 +116,12 @@ public class FunctionExtractingFunctionCatalogIntegrationTests {
String undeploy = undeploy("sample");
assertThat(undeploy.contains("\"name\":\"sample\""));
assertThat(undeploy.contains(
"\"path\":\"maven://io.spring.sample:function-sample:1.0.0.M5\""));
"\"path\":\"maven://io.spring.sample:function-sample: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:1.0.0.M5");
deploy("sample", "maven://io.spring.sample:function-sample:1.0.0.BUILD-SNAPSHOT");
assertThat(new TestRestTemplate().postForObject(
"http://localhost:" + port + "/stream/sample/uppercase", "foo",
String.class)).isEqualTo("FOO");

View File

@@ -52,10 +52,10 @@ public class FunctionExtractingFunctionCatalogTests {
public void init() throws Exception {
if (id == null) {
deploy("sample",
"maven://io.spring.sample:function-sample:1.0.0.M5");
"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.M5");
"maven://io.spring.sample:function-sample-pojo:1.0.0.BUILD-SNAPSHOT");
}
}