[ 
https://issues.apache.org/jira/browse/KNOX-3115?focusedWorklogId=963886&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-963886
 ]

ASF GitHub Bot logged work on KNOX-3115:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Mar/25 17:53
            Start Date: 28/Mar/25 17:53
    Worklog Time Spent: 10m 
      Work Description: pzampino commented on code in PR #1010:
URL: https://github.com/apache/knox/pull/1010#discussion_r2019096651


##########
gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/dispatch/SSEHaDispatchTest.java:
##########
@@ -0,0 +1,330 @@
+/*
+ * 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.knox.gateway.ha.dispatch;
+
+import org.apache.http.HttpStatus;
+import org.apache.http.client.config.CookieSpecs;
+import org.apache.knox.gateway.config.GatewayConfig;
+import org.apache.knox.gateway.ha.provider.HaDescriptor;
+import org.apache.knox.gateway.ha.provider.HaProvider;
+import org.apache.knox.gateway.ha.provider.impl.DefaultHaProvider;
+import org.apache.knox.gateway.ha.provider.impl.HaDescriptorFactory;
+import org.apache.knox.gateway.services.GatewayServices;
+import org.apache.knox.gateway.services.ServiceType;
+import org.apache.knox.gateway.services.security.KeystoreService;
+import org.apache.knox.test.mock.MockServer;
+import org.apache.knox.test.mock.MockServletContext;
+import org.apache.knox.test.mock.MockServletInputStream;
+import org.easymock.Capture;
+import org.easymock.EasyMock;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import javax.servlet.AsyncContext;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.net.URI;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import static org.easymock.EasyMock.capture;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+public class SSEHaDispatchTest {
+
+    private static MockServer MOCK_SSE_SERVER;
+    private static URI URL;
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {
+        MOCK_SSE_SERVER = new MockServer("SSE", true);

Review Comment:
   Would you not need two servers to test HA?





Issue Time Tracking
-------------------

    Worklog Id:     (was: 963886)
    Time Spent: 20m  (was: 10m)

> HA Dispatch for SSE
> -------------------
>
>                 Key: KNOX-3115
>                 URL: https://issues.apache.org/jira/browse/KNOX-3115
>             Project: Apache Knox
>          Issue Type: Improvement
>          Components: Server
>    Affects Versions: 2.2.0
>            Reporter: Tamás Hanicz
>            Assignee: Tamás Hanicz
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The SSE functionality is missing an HA dispatch. It would be nice to have the 
> capability to enable load balancing and sticky sessoin cookies for SSE 
> requests.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to