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

ASF GitHub Bot logged work on ARTEMIS-4986:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Aug/24 13:32
            Start Date: 13/Aug/24 13:32
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on code in PR #5145:
URL: https://github.com/apache/activemq-artemis/pull/5145#discussion_r1715300521


##########
tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/realServer/RolledUpgradeTest.java:
##########
@@ -0,0 +1,295 @@
+/*
+ * 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.activemq.artemis.tests.compatibility.realServer;
+
+import java.io.File;
+import java.lang.invoke.MethodHandles;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.activemq.artemis.api.core.Pair;
+import org.apache.activemq.artemis.api.core.management.SimpleManagement;
+import org.apache.activemq.artemis.util.ServerUtil;
+import org.apache.activemq.artemis.utils.FileUtil;
+import org.apache.activemq.artemis.utils.SpawnedVMSupport;
+import org.apache.activemq.artemis.utils.Wait;
+import org.apache.activemq.artemis.utils.cli.helper.HelperBase;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Assumptions;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RolledUpgradeTest extends CompatBaseTest {
+
+   private static final Logger logger = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+   private static final String TWO_THIRTY_ZIP = 
"./target/old-releases/apache-artemis-2.30.0-bin.zip";
+   private static final String TWO_THIRTY_FIVE_ZIP = 
"./target/old-releases/apache-artemis-2.35.0-bin.zip";
+
+   //private static String sourceHome = HelperBase.getHome().getAbsolutePath();
+
+   public static final String LIVE_0 = "RolledUpgradeTest/live0";
+   public static final String LIVE_1 = "RolledUpgradeTest/live1";
+   public static final String LIVE_2 = "RolledUpgradeTest/live2";
+
+   public static final String BKP_0 = "RolledUpgradeTest/bkp0";
+   public static final String BKP_1 = "RolledUpgradeTest/bkp1";
+   public static final String BKP_2 = "RolledUpgradeTest/bkp2";
+
+   Process live0Process;
+   Process live1Process;
+   Process live2Process;
+
+   Process bkp0Process;
+   Process bkp1Process;
+   Process bkp2Process;
+
+   private static String getHost(int nodeID) {
+      return "localhost";
+   }
+
+   private static int getPort(int nodeID) {
+      return 61616 + nodeID;
+   }
+
+   private static int getPortOffeset(int nodeID) {
+      return nodeID;
+   }
+
+   private static void newServer(File homeLocation,
+                                 String location,
+                                 int serverID,
+                                 String replicaGroupName,
+                                 boolean live,
+                                 int[] connectedNodes) throws Exception {
+      File serverLocation = getFileServerLocation(location);
+      List<String> parameters = new ArrayList<>();
+      deleteDirectory(serverLocation);
+
+      StringBuilder clusterList = new StringBuilder();
+      for (int i = 0; i < connectedNodes.length; i++) {
+         if (i > 0) {
+            clusterList.append(",");
+         }
+         clusterList.append("tcp://" + getHost(connectedNodes[i]) + ":" + 
getPort(connectedNodes[i]));
+      }
+
+      parameters.add(homeLocation.getAbsolutePath() + "/bin/artemis");
+      parameters.add("create");
+      parameters.add("--silent");
+      parameters.add("--user");
+      parameters.add("guest");
+      parameters.add("--password");
+      parameters.add("guest");
+      parameters.add("--port-offset");
+      parameters.add(String.valueOf(getPortOffeset(serverID)));
+      parameters.add("--allow-anonymous");
+      parameters.add("--no-web");
+      parameters.add("--no-autotune");
+      parameters.add("--host");
+      parameters.add("localhost");
+      parameters.add("--clustered");
+      parameters.add("--staticCluster");
+      parameters.add(clusterList.toString());
+      parameters.add("--replicated");
+      if (!live) {
+         parameters.add("--slave");
+      }
+      parameters.add("--no-amqp-acceptor");
+      parameters.add("--no-mqtt-acceptor");
+      parameters.add("--no-hornetq-acceptor");
+      parameters.add("--no-stomp-acceptor");
+      parameters.add(serverLocation.getAbsolutePath());
+
+      ProcessBuilder processBuilder = new ProcessBuilder();
+      processBuilder.command(parameters.toArray(new 
String[parameters.size()]));
+      Process process = processBuilder.start();
+      SpawnedVMSupport.spawnLoggers(null, null, "ArtemisCreate", true, true, 
process);
+      Assertions.assertTrue(process.waitFor(10, TimeUnit.SECONDS));

Review Comment:
   This is asserting the process waited and finished in 10 seconds.  Not sure 
what else I would assert for here?





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

    Worklog Id:     (was: 930046)
    Time Spent: 40m  (was: 0.5h)

> Replication/Vote incompatibility between 2.30 and 2.31+
> -------------------------------------------------------
>
>                 Key: ARTEMIS-4986
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4986
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.31.0
>            Reporter: Clebert Suconic
>            Assignee: Clebert Suconic
>            Priority: Major
>             Fix For: 2.37.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> The change for "ARTEMIS-3474 replace non-inclusive terms" changed  a String 
> that was used on the wire for Voting. That string was sent on the Vote and 
> the other nodes would fail with the following message:
> AMQ224090: This node is not configured for Quorum Voting, all nodes must be 
> configured for HA
> The server will simply not respond the VoteRequest on that case and the 
> blockCall timeout will fail.
> To fix this I'm applying a shorter timeout that will just be ignored and 
> retry at the older packet in case the response wasn't found.
> I was trying to play with Wire versioning but that scenario turned out to be 
> more complex.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to