public static ApplicationWithPrograms deployApplicationWithManager(Class<?> appClass, Supplier<File> folderSupplier, Config config) throws Exception { return deployApplicationWithManager(Id.Namespace.DEFAULT, appClass, folderSupplier, config); }
public static ApplicationWithPrograms deployApplicationWithManager(Class<?> appClass, Supplier<File> folderSupplier) throws Exception { return deployApplicationWithManager(Id.Namespace.DEFAULT, appClass, folderSupplier); }
public static ApplicationWithPrograms deployApplicationWithManager(Id.Namespace namespace, Class<?> appClass, Supplier<File> folderSupplier) throws Exception { return deployApplicationWithManager(namespace, appClass, folderSupplier, null); }
protected ApplicationWithPrograms deployApp(Id.Namespace namespace, Class<?> appClass) throws Exception { return AppFabricTestHelper.deployApplicationWithManager(namespace, appClass, TEMP_FOLDER_SUPPLIER); }
protected ApplicationWithPrograms deployApp(Class<?> appClass) throws Exception { return AppFabricTestHelper.deployApplicationWithManager(appClass, TEMP_FOLDER_SUPPLIER); }
protected ApplicationWithPrograms deployApp(Class<?> appClass, Config config) throws Exception { return AppFabricTestHelper.deployApplicationWithManager(appClass, TEMP_FOLDER_SUPPLIER, config); }
@Test public void testWorkerWithMisbehavedDataset() throws Throwable { final ApplicationWithPrograms app = AppFabricTestHelper.deployApplicationWithManager(AppWithMisbehavedDataset.class, TEMP_FOLDER_SUPPLIER); final ProgramController controller = startProgram(app, AppWithMisbehavedDataset.TableWriter.class); Tasks.waitFor(ProgramController.State.COMPLETED, new Callable<ProgramController.State>() { @Override public ProgramController.State call() throws Exception { return controller.getState(); } }, 30, TimeUnit.SECONDS); // validate worker was able to execute its second transaction final TransactionExecutor executor = txExecutorFactory.createExecutor(datasetCache); executor.execute( new TransactionExecutor.Subroutine() { @Override public void apply() throws Exception { Table table = datasetCache.getDataset(AppWithMisbehavedDataset.TABLE); Row result = table.get(new Get(AppWithMisbehavedDataset.ROW, AppWithMisbehavedDataset.COLUMN)); Assert.assertEquals(AppWithMisbehavedDataset.VALUE, result.getString(AppWithMisbehavedDataset.COLUMN)); } }); }
ApplicationWithPrograms app = AppFabricTestHelper.deployApplicationWithManager(DummyAppWithTrackingTable.class, TEMP_FOLDER_SUPPLIER); List<ProgramController> controllers = Lists.newArrayList();
@Test public void testWorkerDatasetWithMetrics() throws Throwable { final ApplicationWithPrograms app = AppFabricTestHelper.deployApplicationWithManager(AppWithWorker.class, TEMP_FOLDER_SUPPLIER);