Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test2 #14

Merged
merged 56 commits into from
Dec 6, 2018
Merged
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
8cafcab
combine test coverage report (#2643)
htynkn Oct 15, 2018
1ef1220
Optimize ut for serialization model. (#2632)
carryxyh Oct 15, 2018
393ffce
prototype for issue2570 (#2640)
beiwei30 Oct 16, 2018
d8282fe
[Dubbo -fix annotation bug] Fix @Reference bug (#2649)
zonghaishang Oct 17, 2018
b723837
Merge pull request #2656, make sure serialization exception sends bac…
beiwei30 Oct 19, 2018
c805c1d
#1903: supplemental change (#2666)
beiwei30 Oct 21, 2018
5e60bef
Optimize the doSelect method of RandomLoadBalance to reduce the times…
tswstarplanet Oct 21, 2018
dd950ac
解决与quartz集成报错问题 (#2677)
liunancun Oct 23, 2018
6938d48
Code format (#2662)
x-ultimate Oct 23, 2018
f2b6f07
Merge pull request#2679, consumer throws RpcException when RegistryDi…
beiwei30 Oct 24, 2018
7286e23
remove ServiceClassHolder and use the ApplicationModel replacedly (#2…
Jeff-Lv Oct 24, 2018
ac013b1
[Dubbo-1983] Support Protobuf Serialization (#2618)
kun-song Oct 26, 2018
910b261
Smooth Round Robin selection (#2650)
jasonjoo2010 Oct 26, 2018
b8bc80b
enhance pull request 2618 (#2691)
beiwei30 Oct 26, 2018
46f95bf
fix typo error in FAQ (#2684)
xuchuanyin Oct 26, 2018
a777aec
remove author info for RoundRobinLoadBalance (#2697)
jasonjoo2010 Oct 29, 2018
dba175a
fix pom for protostuff serialization (#2700)
beiwei30 Oct 29, 2018
99a00ba
Optimize REGISTRIES field in AbstractRegistryFactory. (#2703)
jingui123 Oct 30, 2018
36a1155
[version 2.7.0]remove the StaticContext class and refactor the code r…
Jeff-Lv Oct 30, 2018
e94d74b
Optimize heartbeat and reconnect task. (#2658)
carryxyh Oct 30, 2018
195c82d
polish the code for pull request 2658: Optimize heartbeat and reconne…
beiwei30 Oct 30, 2018
4d0a36c
重构 ServiceBean 的 isDelay 方法,使其更符合语义 (#2686)
code4wt Oct 30, 2018
0a116aa
【Unit Test】FailbackRegistry Test: recover method (#2591)
tswstarplanet Oct 30, 2018
c21cc05
replace ServiceAnnotationBeanPostProcessor log.isInfoEnabled->log.isW…
Oct 31, 2018
3cf801b
[Dubbo-2678][For Master] Add ability to turn off SPI auto injection, …
chickenlj Nov 1, 2018
0d51bc4
Merge pull request #2725, problems of graceful shutdown in 2.6.3 and …
beiwei30 Nov 5, 2018
505d155
enhance comments (#2735)
beiwei30 Nov 5, 2018
2284ede
code format (#2730)
x-ultimate Nov 5, 2018
16f7a1e
Close all servers/ports after tests finish (#2741)
OrDTesters Nov 6, 2018
aed0102
Simplify the code of StringUtils to make it more graceful. (#2740)
code4wt Nov 6, 2018
56b2193
Add 'forks' config into xml config (#2568)
carryxyh Nov 6, 2018
1a88c22
fix typo (#2747)
zonghaishang Nov 7, 2018
e3bd693
[DUBBO-2489] MockClusterInvoker provides local forced mock,I tested i…
beiwei30 Nov 7, 2018
b0107e7
#2748: Provider should disable mock configuration (#2749)
beiwei30 Nov 7, 2018
aa9f16e
Fix the bug that ReferenceBean refers service more than once when deb…
code4wt Nov 8, 2018
20a5efb
Close all servers/ports after tests finish (#2755)
OrDTesters Nov 8, 2018
a7cf737
add checkstyle rule to check import order (#2745)
htynkn Nov 8, 2018
dcbd326
Changing URL so tests can run in any order (#2760)
OrDTesters Nov 8, 2018
117d485
[Dubbo-2353]fix Invalid property 'interfaceName' of bean class [org.a…
kexianjun Nov 8, 2018
7f5fd46
#2762: [Dubbo - qos-http] stopServer should be invoked ? (#2767)
beiwei30 Nov 9, 2018
bff16eb
#2777: heartbeat threads blocks process shutdown (#2778)
beiwei30 Nov 13, 2018
38a6511
oschina vote (#2786)
beiwei30 Nov 14, 2018
b1a7622
fix typo (#2791)
kun-song Nov 16, 2018
9466425
improvement on Parameters and CollectionUtils (#2790)
kun-song Nov 16, 2018
026fa0b
[REFACTOR]:[fix typo] (#2804)
Ivan97 Nov 19, 2018
5ea6b33
[Dubbo-2798]fix apporiate NotWritablePropertyException (#2800)
kexianjun Nov 20, 2018
28b3736
[Dubbo-2758] Adding dependency on dubbo-remoting-mina for tests in du…
OrDTesters Nov 22, 2018
a24289f
modify dubbo version to 2.6.5
cvictory Nov 23, 2018
46b3458
fix typo of field (#2825)
likemoongg Nov 24, 2018
5aeb049
[Dubbo-2845] Fix OOM in UT testSelectByWeight (#2845) (#2846)
biyuhao Nov 29, 2018
bc6a06c
Fix UT failed on windows with FileNetworkerTest (#2848)
water-coder Nov 29, 2018
133d570
Update README.md
beiwei30 Dec 3, 2018
32140d4
fixed typo of variable (#2875)
zzkyeee Dec 4, 2018
d0f7c05
Remove unnessesary code in RegistryDirectory#doList (#2861)
LiZhenNet Dec 4, 2018
1f751a6
add some ScriptRoute test case (#2879)
lixiaojiee Dec 4, 2018
e8af04d
remove the duplicate superclass of TagRouter and ConditionRouter (#2885)
lixiaojiee Dec 5, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
【Unit Test】FailbackRegistry Test: recover method (apache#2591)
* FailbackRegistry Test: recover method

* fix the type error, and use CountDownLatch await method to fix the unstable problom

* trigger the travis ci test retry

* trigger the code static check again
tswstarplanet authored and beiwei30 committed Oct 30, 2018
commit 0a116aa957a81478234076997426cfb6296c2040
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@
import org.apache.dubbo.common.utils.CollectionUtils;
import org.apache.dubbo.registry.NotifyListener;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

@@ -180,6 +181,28 @@ public void notify(List<URL> urls) {
assertEquals(2, count.get());
}

@Test
public void testRecover() throws Exception {
CountDownLatch countDownLatch = new CountDownLatch(4);
final AtomicReference<Boolean> notified = new AtomicReference<Boolean>(false);
NotifyListener listener = new NotifyListener() {
@Override
public void notify(List<URL> urls) {
notified.set(Boolean.TRUE);
}
};

MockRegistry mockRegistry = new MockRegistry(registryUrl, countDownLatch);
mockRegistry.register(serviceUrl);
mockRegistry.subscribe(serviceUrl, listener);
Assert.assertEquals(1, mockRegistry.getRegistered().size());
Assert.assertEquals(1, mockRegistry.getSubscribed().size());
mockRegistry.recover();
countDownLatch.await();
Assert.assertEquals(0, mockRegistry.getFailedRegistered().size());
Assert.assertEquals(null, mockRegistry.getFailedSubscribed().get(registryUrl));
Assert.assertEquals(countDownLatch.getCount(), 0);
}

private static class MockRegistry extends FailbackRegistry {
CountDownLatch latch;