protected static void setMatrixMockInfo(String groupsPath, String key, boolean isOracle)
      throws Exception {
    // -----------------获取groups信息
    String groupsStr = LoadPropsUtil.loadProps2OneLine(groupsPath, key);
    if (groupsStr == null || StringUtils.isBlank(groupsStr)) {
      throw new Exception("指定path = " + groupsPath + ",key = " + key + "的groups信息为null或者为空字符。");
    }

    // -----------------oracle or mysql
    String groupPath = BaseAtomGroupTestCase.GROUP_PATH;
    String atomPath = BaseAtomGroupTestCase.ATOM_PATH;
    if (isOracle) {
      groupPath = BaseAtomGroupTestCase.GROUP_ORA_PATH;
      atomPath = BaseAtomGroupTestCase.ATOM_ORA_PATH;
    }

    // -----------------获取group信息
    BaseAtomGroupTestCase.dataMap = new HashMap<String, String>();
    String[] groupArr = groupsStr.split(",");

    for (String group : groupArr) {
      group = group.trim();
      String groupStr = "";
      groupStr =
          LoadPropsUtil.loadProps2OneLine(
              groupPath + group + BaseAtomGroupTestCase.PROPERTIES_FILE, group);
      if (groupsStr != null && StringUtils.isNotBlank(groupsStr)) {
        // 获取atom信息
        String[] atomArr = groupStr.split(",");
        for (String atom : atomArr) {
          atom = atom.trim();
          atom = atom.substring(0, atom.indexOf(":"));
          BaseAtomGroupTestCase.initAtomConfig(
              atomPath + atom, BaseAtomGroupTestCase.APPNAME, atom);
        }
        // 获取groupkey
        BaseAtomGroupTestCase.dataMap.put(TGroupDataSource.getFullDbGroupKey(group), groupStr);
      }
    }

    // -----------------dbgroups
    BaseAtomGroupTestCase.dataMap.put(
        new MessageFormat("com.taobao.tddl.v1_{0}_dbgroups")
            .format(new Object[] {BaseAtomGroupTestCase.APPNAME}),
        groupsStr);

    // 建立MockServer
    MockServer.setConfigInfos(BaseAtomGroupTestCase.dataMap);
  }