Skip to content

Commit

Permalink
[Dubbo-apache#2162]Correct the reference retries default value 0 to 2 (
Browse files Browse the repository at this point in the history
…apache#2183)

* Correct the reference retries default value 0 to 2
* fix the unit test error
  • Loading branch information
tswstarplanet authored and jerrick-zhu committed Aug 15, 2018
1 parent f364a44 commit f2188d3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

String layer() default "";

int retries() default 0;
int retries() default 2;

String loadbalance() default "";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
*
* @see Constants#DEFAULT_RETRIES
*/
int retries() default 0;
int retries() default 2;

/**
* Load balance strategy, legal values include: random, roundrobin, leastactive
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public Map<String, String> convert(String[] source) {
Assert.assertEquals("ondisconnect", referenceBean.getOndisconnect());
Assert.assertEquals("owner", referenceBean.getOwner());
Assert.assertEquals("layer", referenceBean.getLayer());
Assert.assertEquals(Integer.valueOf(2), referenceBean.getRetries());
Assert.assertEquals(Integer.valueOf(1), referenceBean.getRetries());
Assert.assertEquals("random", referenceBean.getLoadbalance());
Assert.assertEquals(true, referenceBean.isAsync());
Assert.assertEquals(Integer.valueOf(1), referenceBean.getActives());
Expand Down Expand Up @@ -147,7 +147,7 @@ private static class TestBean {
check = false, init = true, lazy = true, stubevent = true,
reconnect = "reconnect", sticky = true, proxy = "javassist", stub = "stub",
cluster = "failover", connections = 1, callbacks = 1, onconnect = "onconnect",
ondisconnect = "ondisconnect", owner = "owner", layer = "layer", retries = 2,
ondisconnect = "ondisconnect", owner = "owner", layer = "layer", retries = 1,
loadbalance = "random", async = true, actives = 1, sent = true,
mock = "mock", validation = "validation", timeout = 2, cache = "cache",
filter = {"default", "default"}, listener = {"default", "default"}, parameters = {"key1", "value1"}, application = "application",
Expand Down

0 comments on commit f2188d3

Please sign in to comment.