From 8efdec0ac28c0c678dc4d10c58918b5d8e3d3a1c Mon Sep 17 00:00:00 2001 From: Rui Gu Date: Tue, 25 Apr 2017 23:46:48 +0100 Subject: [PATCH] Changing data types in xsd file to all strings. Fix #848 added a test case to cover the change --- .../redisson/spring/support/redisson-1.0.xsd | 78 ++++++++-------- .../support/SpringNamespaceWikiTest.java | 90 ++++++++++++++++++- ...namespace_wiki_single_with_placeholder.xml | 57 ++++++++++++ 3 files changed, 184 insertions(+), 41 deletions(-) create mode 100644 redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_single_with_placeholder.xml diff --git a/redisson/src/main/resources/org/redisson/spring/support/redisson-1.0.xsd b/redisson/src/main/resources/org/redisson/spring/support/redisson-1.0.xsd index 49d442556..c16b343ce 100644 --- a/redisson/src/main/resources/org/redisson/spring/support/redisson-1.0.xsd +++ b/redisson/src/main/resources/org/redisson/spring/support/redisson-1.0.xsd @@ -193,7 +193,7 @@ - + - + + type="xsd:string"> + type="xsd:string"> - + timeout time @@ -294,7 +294,7 @@ ]]> - + Node.ping and Node.pingAll @@ -304,7 +304,7 @@ ]]> - + - + - + - + - + - + - + + type="xsd:string"> each slave @@ -419,7 +419,7 @@ ]]> - + each slave @@ -430,7 +430,7 @@ + type="xsd:string"> each slave @@ -441,7 +441,7 @@ + type="xsd:string"> + type="xsd:string"> + type="xsd:string"> - + - + - + + type="xsd:string"> + type="xsd:string"> + type="xsd:string"> - + - + - + - + - + - + + type="xsd:string"> true then invalidation @@ -951,14 +951,14 @@ ]]> - + 0 then local cache is unbounded. ]]> - + - + - + - + - + - + []) null); + method.setAccessible(true); + SingleServerConfig single = (SingleServerConfig) method.invoke(config, (Object[]) null); + assertEquals(10000, single.getIdleConnectionTimeout()); + assertEquals(20000, single.getPingTimeout()); + assertEquals(30000, single.getConnectTimeout()); + assertEquals(40000, single.getTimeout()); + assertEquals(5, single.getRetryAttempts()); + assertEquals(60000, single.getRetryInterval()); + assertEquals(70000, single.getReconnectionTimeout()); + assertEquals(8, single.getFailedAttempts()); + assertEquals("do_not_use_if_it_is_not_set", single.getPassword()); + assertEquals(10, single.getSubscriptionsPerConnection()); + assertEquals("client_name", single.getClientName()); + assertEquals(11, single.getSubscriptionConnectionMinimumIdleSize()); + assertEquals(12, single.getSubscriptionConnectionPoolSize()); + assertEquals(13, single.getConnectionMinimumIdleSize()); + assertEquals(14, single.getConnectionPoolSize()); + assertEquals(15, single.getDatabase()); + assertEquals(false, single.isDnsMonitoring()); + assertEquals(80000, single.getDnsMonitoringInterval()); + ((ConfigurableApplicationContext) context).close(); + } finally { + run.stop(); + } + } + @Test public void testMasterSlave() throws Exception { RedisRunner.RedisProcess master = new RedisRunner() diff --git a/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_single_with_placeholder.xml b/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_single_with_placeholder.xml new file mode 100644 index 000000000..01962d373 --- /dev/null +++ b/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_single_with_placeholder.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + +