[
https://issues.apache.org/jira/browse/SCB-831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16578342#comment-16578342
]
ASF GitHub Bot commented on SCB-831:
------------------------------------
WillemJiang closed pull request #251: SCB-831 fix test case failed on windows
environment in LoadBalancedClusterMessageSenderTest
URL: https://github.com/apache/incubator-servicecomb-saga/pull/251
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/omega/omega-connector/omega-connector-grpc/src/test/java/org/apache/servicecomb/saga/omega/connector/grpc/LoadBalancedClusterMessageSenderTest.java
b/omega/omega-connector/omega-connector-grpc/src/test/java/org/apache/servicecomb/saga/omega/connector/grpc/LoadBalancedClusterMessageSenderTest.java
index 3a16558a..e353cdfc 100644
---
a/omega/omega-connector/omega-connector-grpc/src/test/java/org/apache/servicecomb/saga/omega/connector/grpc/LoadBalancedClusterMessageSenderTest.java
+++
b/omega/omega-connector/omega-connector-grpc/src/test/java/org/apache/servicecomb/saga/omega/connector/grpc/LoadBalancedClusterMessageSenderTest.java
@@ -278,6 +278,9 @@ public Boolean call() throws Exception {
assertThat(eventsMap.get(8080).isEmpty(), is(true));
assertThat(eventsMap.get(8090).isEmpty(), is(true));
+ //TODO:it seems in Windows environment we need wait a short time in order
to make sure reconnect mechanism work
+ Thread.sleep(2000);
+
startServerOnPort(8080);
startServerOnPort(8090);
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Saga UT failed at LoadBalancedClusterMessageSenderTest on Windows environment
> -----------------------------------------------------------------------------
>
> Key: SCB-831
> URL: https://issues.apache.org/jira/browse/SCB-831
> Project: Apache ServiceComb
> Issue Type: Bug
> Components: Saga
> Affects Versions: saga-0.2.0
> Environment: Windows 7 or Windows Server 2008 R2
> Reporter: yangyongzheng
> Priority: Major
>
> UT will failed at :
> LoadBalancedClusterMessageSenderTest.stopSendingWhenClusterIsDown
> It seems this assert
> await().atMost(2, SECONDS).until(new Callable<Boolean>() {
> @Override
> public Boolean call() throws Exception {
> return connected.get(8080).size() == 2 || connected.get(8090).size()
> == 2;
> }
> });
> The connected size will only be 1 not 2
> I had found out that GrpcCompensateStreamObserver don't trigger onError when
> simulate connection closed in this case so LoadBalancedClusterMessageSender
> can't take PushBackReconnectRunnable from pendingTasks in order to reconnect
> server, then the connected count will be only 1, then test case failed
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)