potentially fixed the issue

pull/1283/head
akib6074@gmail.com 3 years ago
parent 8dac296a65
commit 507de12bd0

@ -45,6 +45,7 @@ public class JacksonHandler implements JsonFacade {
MAPPER.setSerializationInclusion(JsonInclude.Include.NON_NULL);
MAPPER.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
MAPPER.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
MAPPER.configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, true);
}
@Override

@ -24,9 +24,9 @@ public class ContentUtilTest {
@Test
public void assertGetPoolContent() {
String testText = "{\"tenantId\":\"prescription\",\"itemId\":\"dynamic-threadpool-example\",\"tpId\":" +
"\"message-consume\",\"queueType\":1,\"capacity\":4,\"keepAliveTime\":513,\"rejectedType\":4,\"isAlarm\"" +
":1,\"capacityAlarm\":80,\"livenessAlarm\":80,\"allowCoreThreadTimeOut\":1}";
String testText = "{\"allowCoreThreadTimeOut\":1,\"capacity\":4,\"capacityAlarm\":" +
"80,\"isAlarm\":1,\"itemId\":\"dynamic-threadpool-example\",\"keepAliveTime\":513,\"livenessAlarm\":80,\"queueType\"" +
":1,\"rejectedType\":4,\"tenantId\":\"prescription\",\"tpId\":\"message-consume\"}";
ThreadPoolParameterInfo threadPoolParameterInfo = ThreadPoolParameterInfo.builder().tenantId("prescription")
.itemId("dynamic-threadpool-example").tpId("message-consume").content("描述信息").corePoolSize(1)
.maximumPoolSize(2).queueType(1).capacity(4).keepAliveTime(513).executeTimeOut(null).rejectedType(4)

@ -31,11 +31,11 @@ import java.util.List;
public class JSONUtilTest {
private static final Foo EXPECTED_FOO = new Foo(1, "foo1", new Foo(2, "foo2", null));
private static final Foo EXPECTED_FOO = new Foo(new Foo(null, 2, "foo2"), 1, "foo1");
private static final List<Foo> EXPECTED_FOO_ARRAY = Arrays.asList(EXPECTED_FOO, EXPECTED_FOO);
private static final String EXPECTED_FOO_JSON = "{\"id\":1,\"name\":\"foo1\",\"foo\":{\"id\":2,\"name\":\"foo2\"}}";
private static final String EXPECTED_FOO_JSON = "{\"foo\":{\"id\":2,\"name\":\"foo2\"},\"id\":1,\"name\":\"foo1\"}";
private static final String EXPECTED_FOO_JSON_ARRAY = "[" + EXPECTED_FOO_JSON + "," + EXPECTED_FOO_JSON + "]";
@ -79,10 +79,11 @@ public class JSONUtilTest {
@Data
private static class Foo {
private Foo foo;
private Integer id;
private String name;
private Foo foo;
}
}

Loading…
Cancel
Save