Fix combatibility with boot 2.x
- Change test runtime deps for RedisRule not to fail. - Fix metrics tests to align changes in boot's new micrometrics. - Fixes #410 - Fixes #418
This commit is contained in:
@@ -24,6 +24,8 @@ project('spring-statemachine-data-redis') {
|
||||
optional "org.eclipse.persistence:javax.persistence"
|
||||
testCompile project(path:":spring-statemachine-data-common", configuration:"testArtifacts")
|
||||
testCompile "org.springframework.boot:spring-boot-starter-test"
|
||||
testRuntime "org.apache.commons:commons-pool2"
|
||||
testRuntime "redis.clients:jedis"
|
||||
testRuntime "org.springframework.boot:spring-boot-starter-data-redis"
|
||||
testRuntime "org.springframework.boot:spring-boot-starter-web"
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package demo.monitoring;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.hasItems;
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.hamcrest.CoreMatchers.notNullValue;
|
||||
import static org.hamcrest.Matchers.allOf;
|
||||
import static org.hamcrest.Matchers.containsInAnyOrder;
|
||||
@@ -84,9 +85,12 @@ public class MonitoringTests {
|
||||
perform(get("/application/metrics")).
|
||||
andExpect(jsonPath("$.names", hasItems("ssm.transition.duration", "ssm.transition.transit")));
|
||||
mvc.
|
||||
perform(get("/application/metrics/ssm.transition.duration")).
|
||||
andDo(print()).
|
||||
andExpect(jsonPath("$['ssmTransitionDuration.transitionname.INITIAL_S1']", notNullValue()));
|
||||
perform(get("/application/metrics/ssm.transition.transit")).
|
||||
andDo(print()).
|
||||
andExpect(jsonPath("$.name", is("ssm.transition.transit"))).
|
||||
andExpect(jsonPath("$.measurements[0].value", is(2.0))).
|
||||
andExpect(jsonPath("$.availableTags[0].tag", is("transitionName"))).
|
||||
andExpect(jsonPath("$.availableTags[0].values", hasItems("EXTERNAL_S1_S2","INITIAL_S1")));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user