Ejemplo n.º 1
0
 @BeforeClass
 public static void setUp() throws Exception {
   server = new FakeServer(true);
   server.deployVDB(VDB, UnitTestUtil.getTestDataPath() + "/PartsSupplier.vdb");
   connection = server.createConnection("jdbc:teiid:" + VDB); // $NON-NLS-1$ //$NON-NLS-2$	
   dbMetadata = connection.getMetaData();
 }
  @BeforeClass
  public static void setUp() throws Exception {
    server = new FakeServer(true);

    LoopbackExecutionFactory loopy = new LoopbackExecutionFactory();
    loopy.setRowCount(10);
    loopy.start();
    server.addTranslator("l", loopy);

    String DDL = "CREATE FOREIGN TABLE G1 (e1 string, e2 integer);";
    ModelMetaData model = new ModelMetaData();
    model.setName("TEMP");
    model.setModelType(Model.Type.PHYSICAL);
    model.setSchemaSourceType("DDL");
    model.setSchemaText(DDL);
    SourceMappingMetadata sm = new SourceMappingMetadata();
    sm.setName("loopy");
    sm.setTranslatorName("l");
    model.addSourceMapping(sm);

    server.deployVDB("test", model);
    conn = server.createConnection("jdbc:teiid:test");
  }