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


##########
hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/hbase/HbaseUnitTest.java:
##########
@@ -0,0 +1,82 @@
+/*
+ * 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.hadoop.hbase.client.Result;
+import org.apache.hugegraph.backend.store.BackendEntry.BackendIterator;
+import org.apache.hugegraph.backend.store.BackendStore;
+import org.apache.hugegraph.testutil.Assert;
+import org.apache.hugegraph.backend.store.hbase.HbaseSessions;
+import org.apache.hugegraph.util.StringEncoding;
+import org.junit.Test;
+
+import java.nio.charset.StandardCharsets;
+
+public class HbaseUnitTest extends BaseHbaseUnitTest {
+
+    @Test
+    public void testHbaseMetaVersionAfterTruncate() {
+        BackendStore systemStore = this.provider.loadSystemStore(config);
+
+        // Record system version before truncation
+        String beforeVersion = systemStore.storedVersion();
+
+        HbaseSessions.Session testsession = this.sessions.session();

Review Comment:
   ⚠️ **Test isolation concern: verify test data cleanup**
   
   The test inserts data with specific row keys (`row_trunc_v`, `row_trunc_oe`, 
`row_trunc_ie`). If this test runs multiple times or fails mid-execution, 
residual data might affect subsequent runs.
   
   Consider:
   1. Using unique row keys per test run (e.g., append timestamp/UUID)
   2. Adding explicit cleanup in `@Before` setup
   3. Verifying the `@After` teardown properly cleans all test data



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