// DNode1 enters with partitions t1/1/0 and t1/2/0
ctx.updateTablespaceVersions(facade1.getDNodeInfo(), DNodeEvent.ENTRY);
assertEquals(2, ctx.getTablespaceVersionsMap().keySet().size());
Tablespace tablespaceV1 = ctx.getTablespaceVersionsMap().get(new TablespaceVersion("t1", 1l));
Tablespace tablespaceV2 = ctx.getTablespaceVersionsMap().get(new TablespaceVersion("t1", 2l));
assertTablespace(tablespaceV1, new Integer[] { 0 }, "dnode1");
assertTablespace(tablespaceV2, new Integer[] { 0 }, "dnode1");
// DNode2 enters with partitions t1/1/0 and t1/2/1
// DNode2 enters with partitions t1/3/0 and t2/1/0 too
DNodeInfoFacade facade2 = new DNodeInfoFacade("dnode2");
facade2.addTablespaceVersionPartition("t1", 1l, 0);
facade2.addTablespaceVersionPartition("t1", 2l, 1);
facade2.addTablespaceVersionPartition("t1", 3l, 0);
facade2.addTablespaceVersionPartition("t2", 1l, 0);
ctx.updateTablespaceVersions(facade2.getDNodeInfo(), DNodeEvent.ENTRY);
Tablespace tablespace1V1 = ctx.getTablespaceVersionsMap().get(new TablespaceVersion("t1", 1l));
Tablespace tablespace1V2 = ctx.getTablespaceVersionsMap().get(new TablespaceVersion("t1", 2l));
Tablespace tablespace1V3 = ctx.getTablespaceVersionsMap().get(new TablespaceVersion("t1", 3l));
Tablespace tablespace2V1 = ctx.getTablespaceVersionsMap().get(new TablespaceVersion("t2", 1l));
assertTablespace(tablespace1V1, new Integer[] { 0, 0 }, "dnode1", "dnode2");
assertTablespace(tablespace1V2, new Integer[] { 0, 1 }, "dnode1", "dnode2");
assertTablespace(tablespace1V3, new Integer[] { 0 }, "dnode2");
assertTablespace(tablespace2V1, new Integer[] { 0 }, "dnode2");