ddanielr commented on code in PR #4513:
URL: https://github.com/apache/accumulo/pull/4513#discussion_r1710190354


##########
test/src/main/java/org/apache/accumulo/test/DataVersionIT.java:
##########
@@ -0,0 +1,80 @@
+/*
+ * 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
+ *
+ *   https://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.accumulo.test;
+
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.io.File;
+
+import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.harness.SharedMiniClusterBase;
+import org.apache.accumulo.minicluster.ServerType;
+import org.apache.accumulo.server.AccumuloDataVersion;
+import org.apache.accumulo.start.Main;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+
+public class DataVersionIT extends SharedMiniClusterBase {
+
+  @BeforeAll
+  public static void setup() throws Exception {
+    startMiniCluster();
+  }
+
+  @AfterAll
+  public static void tearDown() {
+    stopMiniCluster();
+  }
+
+  @Test
+  public void test() throws Exception {
+
+    File root = getCluster().getConfig().getAccumuloDir();
+    String path = root + "/" + Constants.VERSION_DIR;
+    Path rootPath = new Path(path + "/" + AccumuloDataVersion.get());
+    FileSystem fs = getCluster().getFileSystem();
+    Path newPath = new Path(path + "/" + (AccumuloDataVersion.get() + 1));
+
+    assertTrue(fs.exists(rootPath));
+
+    getCluster().stop();
+
+    fs.create(newPath, true);
+
+    for (ServerType st : ServerType.values()) {
+
+      if (!st.getDeclaringClass().isAnnotationPresent(Deprecated.class)) {
+        Process p = getCluster().exec(Main.class, 
st.prettyPrint()).getProcess();

Review Comment:
   This doesn't seem to be working as intended. 
   I ran the IT locally and looked at the log files for the Main class.
   
   ```
   accumulo.test.DataVersionIT_SharedMiniClusterBase/lib/ext
   Invalid argument: Java <main class> 'TServer' was not found.  Please use the 
wholly qualified package name.
   ```
   
   So the test is passing because all processes are failing to start. However, 
it's not because of the VersionNumber mismatch, it's just due to an invalid 
class name being used.
   
   Looking at a running TServer process, the process is started with the full 
class name: `org.apache.accumulo.start.Main 
org.apache.accumulo.tserver.TabletServer`



-- 
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: notifications-unsubscr...@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to