You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hx...@apache.org on 2021/05/03 07:16:22 UTC

[iotdb] 01/01: [IOTDB-1354] fix errors in SlotPartitionTableTest

This is an automated email from the ASF dual-hosted git repository.

hxd pushed a commit to branch issue1354
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 0b63d3cd1e6639b8edb24c71ac58252b22088630
Author: xiangdong huang <sa...@gmail.com>
AuthorDate: Mon May 3 15:15:45 2021 +0800

    [IOTDB-1354] fix errors in SlotPartitionTableTest
---
 .../apache/iotdb/cluster/partition/SlotPartitionTableTest.java | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/cluster/src/test/java/org/apache/iotdb/cluster/partition/SlotPartitionTableTest.java b/cluster/src/test/java/org/apache/iotdb/cluster/partition/SlotPartitionTableTest.java
index 6614517..4726981 100644
--- a/cluster/src/test/java/org/apache/iotdb/cluster/partition/SlotPartitionTableTest.java
+++ b/cluster/src/test/java/org/apache/iotdb/cluster/partition/SlotPartitionTableTest.java
@@ -63,7 +63,6 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
-import org.mockito.internal.util.reflection.Whitebox;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -118,7 +117,7 @@ public class SlotPartitionTableTest {
     prevReplicaNum = ClusterDescriptor.getInstance().getConfig().getReplicationNum();
     ClusterDescriptor.getInstance().getConfig().setReplicationNum(replica_size);
     tables = new SlotPartitionTable[20];
-    mManager = new MManager[20];
+    // mManager = new MManager[20];
 
     // suppose there are 40 storage groups and each node maintains two of them.
     String[] storageNames = new String[40];
@@ -139,11 +138,6 @@ public class SlotPartitionTableTest {
       node = localTable.routeToHeaderByTime(storageNames[i + 20], 0);
       nodeSGs[node.getMetaPort() - 30000].add(storageNames[i + 20]);
     }
-    for (int i = 0; i < 20; i++) {
-      mManager[i] = MManagerWhiteBox.newMManager("target/schemas/mlog_" + i);
-      initMockMManager(i, mManager[i], storageNames, nodeSGs[i]);
-      Whitebox.setInternalState(tables[i], "mManager", mManager[i]);
-    }
   }
 
   private void initMockMManager(
@@ -225,7 +219,7 @@ public class SlotPartitionTableTest {
 
     assertEquals(
         new Node(
-            "localhost", 30000 + last, last, 40000 + last, Constants.RPC_PORT + start, "localhost"),
+            "localhost", 30000 + last, last, 40000 + last, Constants.RPC_PORT + last, "localhost"),
         group.get(replica_size - 1));
   }