[ 
https://issues.apache.org/jira/browse/SCB-234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16326859#comment-16326859
 ] 

ASF GitHub Bot commented on SCB-234:
------------------------------------

seanyinx commented on a change in pull request #120: SCB-234 fail fast at 
SagaStart if all alpha clusters are down
URL: 
https://github.com/apache/incubator-servicecomb-saga/pull/120#discussion_r161684095
 
 

 ##########
 File path: 
omega/omega-connector/omega-connector-grpc/src/test/java/org/apache/servicecomb/saga/omega/connector/grpc/RetryableMessageSenderTest.java
 ##########
 @@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.saga.omega.connector.grpc;
+
+import static com.seanyinx.github.unit.scaffolding.AssertUtils.expectFailing;
+import static com.seanyinx.github.unit.scaffolding.Randomness.uniquify;
+import static org.hamcrest.core.Is.is;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import java.util.concurrent.BlockingQueue;
+
+import org.apache.servicecomb.saga.omega.transaction.MessageSender;
+import org.apache.servicecomb.saga.omega.transaction.OmegaException;
+import org.apache.servicecomb.saga.omega.transaction.SagaStartedEvent;
+import org.apache.servicecomb.saga.omega.transaction.TxEvent;
+import org.apache.servicecomb.saga.omega.transaction.TxStartedEvent;
+import org.junit.Test;
+
+public class RetryableMessageSenderTest {
+  @SuppressWarnings("unchecked")
+  private final BlockingQueue<MessageSender> availableMessageSenders = 
mock(BlockingQueue.class);
 
 Review comment:
   please don't mock java data structure

----------------------------------------------------------------
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:
us...@infra.apache.org


> [pack] fail fast if alpha cluster down
> --------------------------------------
>
>                 Key: SCB-234
>                 URL: https://issues.apache.org/jira/browse/SCB-234
>             Project: Apache ServiceComb
>          Issue Type: Improvement
>          Components: Saga
>            Reporter: Yin Xiang
>            Assignee: Eric Lee
>            Priority: Major
>             Fix For: saga-0.1.0
>
>
> when alpha cluster is down, future transactions should fail immediately at 
> @SagaStart instead of keep retrying, in order not to stress the services 
> further by blocking all the request threads.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to