protected void setUp(AbstractProjectBuilder projectBuilder, boolean force) throws Exception { super.setUp(); is_first = (is_first == null ? true : false); this.last_type = ProjectType.TEST; if (force == false) { catalog = project_catalogs.get(this.last_type); catalog_db = project_databases.get(this.last_type); p_estimator = project_p_estimators.get(this.last_type); } if (catalog == null || force) { String catalogJar = new File(projectBuilder.getJarName(true)).getAbsolutePath(); try { boolean status = projectBuilder.compile(catalogJar); assert (status); } catch (Exception ex) { throw new RuntimeException( "Failed to create " + projectBuilder.getProjectName() + " catalog [" + catalogJar + "]", ex); } catalog = new Catalog(); try { // read in the catalog String serializedCatalog = JarReader.readFileFromJarfile(catalogJar, CatalogUtil.CATALOG_FILENAME); // create the catalog (that will be passed to the ClientInterface catalog.execute(serializedCatalog); } catch (Exception ex) { throw new RuntimeException( "Failed to load " + projectBuilder.getProjectName() + " catalog [" + catalogJar + "]", ex); } this.init(this.last_type, catalog); } }