コード例 #1
0
 /** Drop fact_without_wt table if exixsts. */
 public static void dropFactIfExists() {
   LensFactCommands command = getCommand();
   String factList = command.showFacts(null);
   if (factList.contains(FACT_NAME)) {
     command.dropFact(FACT_NAME, false);
     TestLensStorageCommands.dropStorage(FACT_LOCAL);
   }
 }
コード例 #2
0
  /**
   * Adds the fact_without_wt table.
   *
   * @throws java.io.IOException
   */
  public static void addFactTable() throws IOException, URISyntaxException {
    LensFactCommands command = getCommand();
    String factList = command.showFacts(null);
    Assert.assertEquals(command.showFacts(CUBE_NAME), "No fact found for " + CUBE_NAME);
    Assert.assertEquals(factList, "No fact found", "Fact tables should not be found.");
    // add local storage before adding fact table
    TestLensStorageCommands.addLocalStorage(FACT_LOCAL);
    URL factSpec =
        TestLensFactCommandsWithMissingWeight.class.getClassLoader().getResource(FACT_XML_FILE);
    String response = null;
    response = command.createFact(new File(factSpec.toURI()));

    Assert.assertEquals(response, "failed", "Fact table creation should not be successful.");
    Assert.assertEquals(
        command.showFacts(CUBE_NAME),
        "No fact found for " + CUBE_NAME,
        "Fact tables should not be found.");
  }
コード例 #3
0
 private void dropSampleCube() {
   getCubeCommand().dropCube(CUBE_NAME);
   TestLensStorageCommands.dropStorage(FACT_LOCAL);
 }