Search in sources :

Example 6 with ShardsStatus

use of com.cubrid.cubridmanager.core.shard.model.ShardsStatus in project cubrid-manager by CUBRID.

the class ShardNodeTest method testShardNode.

public void testShardNode() {
    ShardNode node = new ShardNode();
    Shards shards = new Shards();
    Map<String, String> dbStatusMap = new HashMap<String, String>();
    String dbName = "demodb";
    String dbStatus = "OFF";
    String severStatus = "Shard #0";
    ShardsStatus shardsStatus = new ShardsStatus();
    node.setShards(shards);
    assertEquals(node.getShards(), shards);
    node.setDbStatusMap(dbStatusMap);
    assertEquals(node.getDbStatusMap(), dbStatusMap);
    node.setDbStatus(dbName, dbStatus);
    Map<String, String> dbStatusMap2 = node.getDbStatusMap();
    assertEquals(dbStatusMap2.get(dbName), dbStatus);
    node.setSeverStatus(severStatus);
    assertEquals(node.getSeverStatus(), severStatus);
    assertNotNull(node.getStatus());
    node.setShardsStatus(shardsStatus);
    assertEquals(node.getShardsStatus(), shardsStatus);
    assertNotNull(node.getBrokerInfo());
}
Also used : ShardsStatus(com.cubrid.cubridmanager.core.shard.model.ShardsStatus) HashMap(java.util.HashMap) Shards(com.cubrid.cubridmanager.core.shard.model.Shards)

Aggregations

ShardsStatus (com.cubrid.cubridmanager.core.shard.model.ShardsStatus)6 Shards (com.cubrid.cubridmanager.core.shard.model.Shards)3 HashMap (java.util.HashMap)3 ServerInfo (com.cubrid.cubridmanager.core.common.model.ServerInfo)2 Shard (com.cubrid.cubridmanager.core.shard.model.Shard)2 ShardStatus (com.cubrid.cubridmanager.core.shard.model.ShardStatus)2 GetShardConfTask (com.cubrid.cubridmanager.core.shard.task.GetShardConfTask)2 GetShardStatusTask (com.cubrid.cubridmanager.core.shard.task.GetShardStatusTask)2 CubridNodeChangedEvent (com.cubrid.common.ui.spi.event.CubridNodeChangedEvent)1 ICubridNode (com.cubrid.common.ui.spi.model.ICubridNode)1 ServerUserInfo (com.cubrid.cubridmanager.core.common.model.ServerUserInfo)1 TreeNode (com.cubrid.cubridmanager.core.common.socket.TreeNode)1 ShardConnection (com.cubrid.cubridmanager.core.shard.model.ShardConnection)1 ShardKeys (com.cubrid.cubridmanager.core.shard.model.ShardKeys)1 CubridShard (com.cubrid.cubridmanager.ui.spi.model.CubridShard)1 ColumnWeightData (org.eclipse.jface.viewers.ColumnWeightData)1 TableLayout (org.eclipse.jface.viewers.TableLayout)1 TableViewer (org.eclipse.jface.viewers.TableViewer)1 Display (org.eclipse.swt.widgets.Display)1