imbajin commented on code in PR #2911:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2911#discussion_r2554943911


##########
hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/hbase/HbaseUnitTest.java:
##########
@@ -0,0 +1,43 @@
+/*
+ *
+ *  * 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.hugegraph.unit.hbase;
+
+import org.apache.hugegraph.backend.store.BackendStore;
+import org.apache.hugegraph.testutil.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class HbaseUnitTest extends BaseHbaseUnitTest {
+    @Before
+    public void setUp(){
+        super.setup();
+    }
+
+    @Test
+    public void testMysqlMetaVersion(){

Review Comment:
   ⚠️ **Test Method Name Mismatch**
   
   The test method is named `testMysqlMetaVersion()` but it's testing HBase 
functionality. This appears to be a copy-paste error from MySQL tests.
   
   ```suggestion
   @Test
   public void testHbaseMetaVersionAfterTruncate() {
   ```
   
   This makes the test's purpose clearer and matches the actual functionality 
being tested.



##########
hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/hbase/HbaseUnitTest.java:
##########
@@ -0,0 +1,43 @@
+/*
+ *
+ *  * 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.hugegraph.unit.hbase;
+
+import org.apache.hugegraph.backend.store.BackendStore;
+import org.apache.hugegraph.testutil.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class HbaseUnitTest extends BaseHbaseUnitTest {
+    @Before
+    public void setUp(){
+        super.setup();
+    }
+
+    @Test

Review Comment:
   ⚠️ **Incomplete Test Coverage**
   
   The test only verifies that meta version is preserved, but doesn't verify 
the actual truncation behavior. Consider adding assertions to verify:
   
   1. Data tables are actually truncated (e.g., insert some data, truncate, 
verify data is gone)
   2. Meta table content remains intact
   3. The graph can be used normally after truncation
   
   Example enhancement:
   ```java
   @Test
   public void testHbaseMetaVersionAfterTruncate() {
       BackendStore systemStore = this.provider.loadSystemStore(config);
       BackendStore graphStore = this.provider.loadGraphStore(config);
       
       // Record initial version
       String beforeVersion = systemStore.storedVersion();
       
       // Insert some test data to verify truncation
       // ... add test data insertion code ...
       
       // Perform truncation
       this.provider.truncate();
       
       // Verify version preserved
       String afterVersion = systemStore.storedVersion();
       Assert.assertEquals(beforeVersion, afterVersion);
       
       // Verify data tables are empty
       // ... add verification code ...
   }
   ```



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to