コード例 #1
0
ファイル: StressTest.java プロジェクト: GerritBoers/exist
  protected void setUp() throws Exception {
    rootCol = DBUtils.setupDB(URI);

    testCol = rootCol.getChildCollection(XmldbURI.ROOT_COLLECTION + "/test");
    if (testCol != null) {
      CollectionManagementService mgr = DBUtils.getCollectionManagementService(rootCol);
      mgr.removeCollection(XmldbURI.ROOT_COLLECTION + "/test");
    }

    testCol = DBUtils.addCollection(rootCol, "test");
    assertNotNull(testCol);

    System.out.println("Generating " + RUNS + " tags ...");

    tags = new String[RUNS];
    for (int i = 0; i < RUNS; i++) {
      tags[i] = "TAG" + i;
    }

    DBUtils.addXMLResource(testCol, "test.xml", XML);
  }