gemmellr commented on code in PR #4615:
URL: https://github.com/apache/activemq-artemis/pull/4615#discussion_r1324249926


##########
tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/upgradeTest/UpgradeCurrentVersion.java:
##########
@@ -0,0 +1,70 @@
+/*
+ * 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
+ * <br>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <br>
+ * 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.smoke.upgradeTest;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import java.io.File;
+
+import org.apache.activemq.artemis.tests.smoke.common.SmokeTestBase;
+import org.apache.activemq.artemis.tests.util.CFUtil;
+import org.apache.activemq.artemis.util.ServerUtil;
+import org.apache.activemq.artemis.utils.RandomUtil;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/** This test is making sure the upgrade command would be able to upgrade a 
test I created with artemis 2.25.0 */
+public class UpgradeCurrentVersion extends SmokeTestBase {
+
+   File upgradedServer;
+
+   Process processServer;
+
+   @Before
+   public void beforeTest() throws Exception {
+      upgradedServer = new File(basedir + "/target/upgrade/currentVersion");
+
+      processServer = ServerUtil.startServer(upgradedServer.getAbsolutePath(), 
"upgradedServer", 0, 5000);
+      addProcess(processServer);
+   }
+
+   @Test
+   public void testSimpleSendReceive() throws Throwable {

Review Comment:
   I think a likely better and faster test would be to comparable to / part-of 
the existing CompareUpgradeTest. We already have a 
current-expected-instance-config for those existing tests to compare with their 
old-upgraded-instance output to check for match. We can compare a new 
current-version-upgraded instance config with that and check they match in much 
the same fashion, whereas this test wouldnt notice if it did change something 
unless that actually breaks the server.



##########
tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/upgradeTest/UpgradeCurrentVersion.java:
##########
@@ -0,0 +1,70 @@
+/*
+ * 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
+ * <br>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <br>
+ * 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.smoke.upgradeTest;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import java.io.File;
+
+import org.apache.activemq.artemis.tests.smoke.common.SmokeTestBase;
+import org.apache.activemq.artemis.tests.util.CFUtil;
+import org.apache.activemq.artemis.util.ServerUtil;
+import org.apache.activemq.artemis.utils.RandomUtil;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/** This test is making sure the upgrade command would be able to upgrade a 
test I created with artemis 2.25.0 */

Review Comment:
   Comment is wrong, remove? (It applied to the original test, but not this 
one).



##########
tests/smoke-tests/pom.xml:
##########
@@ -1318,6 +1318,31 @@
                      </args>
                   </configuration>
                </execution>
+               <execution>
+                  <phase>test-compile</phase>
+                  <id>upgrade-current-version-phrase1</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <noWeb>false</noWeb>
+                     
<instance>${basedir}/target/upgrade/currentVersion</instance>
+                     <args>
+                        <arg>--disable-persistence</arg>
+                     </args>
+                  </configuration>
+               </execution>
+               <execution>
+                  <phase>test-compile</phase>
+                  <id>upgrade-current-version-phase2</id>
+                  <goals>
+                     <goal>upgrade</goal>
+                  </goals>
+                  <configuration>
+                     
<instance>${basedir}/target/upgrade/currentVersion</instance>
+                  </configuration>
+               </execution>
+

Review Comment:
   This is being inserted in the middle of existing executions used together 
for a test, separating them...moving this addition up (e.g line 1306) or down 
(e.g. line 1379) would make it more understandable later.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to