[
https://issues.apache.org/jira/browse/GEODE-3284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16109152#comment-16109152
]
ASF GitHub Bot commented on GEODE-3284:
---------------------------------------
Github user pivotal-amurmann commented on a diff in the pull request:
https://github.com/apache/geode/pull/673#discussion_r130647800
--- Diff:
geode-protobuf/src/test/java/org/apache/geode/protocol/protobuf/operations/GetAvailableServersOperationHandlerJUnitTest.java
---
@@ -0,0 +1,131 @@
+/*
+ * 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.geode.protocol.protobuf.operations;
+
+import
org.apache.geode.cache.client.internal.locator.GetAllServersResponse;
+import org.apache.geode.distributed.ConfigurationProperties;
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import org.apache.geode.distributed.internal.ServerLocation;
+import org.apache.geode.distributed.internal.tcpserver.TcpClient;
+import org.apache.geode.internal.cache.GemFireCacheImpl;
+import org.apache.geode.protocol.protobuf.BasicTypes;
+import org.apache.geode.protocol.protobuf.Failure;
+import org.apache.geode.protocol.protobuf.Result;
+import org.apache.geode.protocol.protobuf.ServerAPI;
+import
org.apache.geode.protocol.protobuf.ServerAPI.GetAvailableServersResponse;
+import org.apache.geode.protocol.protobuf.Success;
+import
org.apache.geode.protocol.protobuf.utilities.ProtobufRequestUtilities;
+import org.apache.geode.test.junit.categories.UnitTest;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+@Category(UnitTest.class)
+public class GetAvailableServersOperationHandlerJUnitTest extends
OperationHandlerJUnitTest {
+
+ private TcpClient mockTCPClient;
+
+ @Before
+ public void setUp() throws Exception {
+ super.setUp();
+
+ operationHandler = mock(GetAvailableServersOperationHandler.class);
+ cacheStub = mock(GemFireCacheImpl.class);
+ when(operationHandler.process(any(), any(),
any())).thenCallRealMethod();
+ InternalDistributedSystem mockDistributedSystem =
mock(InternalDistributedSystem.class);
--- End diff --
Can we have some blank lines as separators between segments that pertain to
a single mock? Right now this is a fairly impenetrable wall of text.
> New flow: getAvailableServers
> -----------------------------
>
> Key: GEODE-3284
> URL: https://issues.apache.org/jira/browse/GEODE-3284
> Project: Geode
> Issue Type: Sub-task
> Components: client/server
> Reporter: Brian Baynes
>
> As a Geode client user, I'd like to be able to know all available servers in
> a grid in order to support operations targeting any available server.
> Create op handler for getAvailableServers message, following proto message
> definition.
> Client should be able to complete getAvailableServers, receiving all servers
> available in grid.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)