@Override public ApplicationDetail getApplicationDetail(ApplicationId applicationId) throws Exception { return appFabricClient.getVersionedInfo(applicationId); }
@Override public ApplicationDetail getApplicationDetail(ApplicationId applicationId) throws Exception { return appFabricClient.getVersionedInfo(applicationId); }
@Override public void stopAll() { try { ApplicationDetail appDetail = appFabricClient.getVersionedInfo(application); for (ProgramRecord programRecord : appDetail.getPrograms()) { try { appFabricClient.stopProgram(application.getNamespace(), application.getApplication(), appDetail.getAppVersion(), programRecord.getName(), programRecord.getType()); } catch (BadRequestException e) { // Ignore this as this will be throw if the program is not running, which is fine as there could // be programs in the application that are currently not running. } waitForStopped(application.program(programRecord.getType(), programRecord.getName())); } } catch (NamespaceNotFoundException e) { // This can be safely ignore if the unit-test already deleted the namespace } catch (Exception e) { throw Throwables.propagate(e); } }
@Override public void stopAll() { try { ApplicationDetail appDetail = appFabricClient.getVersionedInfo(application); for (ProgramRecord programRecord : appDetail.getPrograms()) { try { appFabricClient.stopProgram(application.getNamespace(), application.getApplication(), appDetail.getAppVersion(), programRecord.getName(), programRecord.getType()); } catch (BadRequestException e) { // Ignore this as this will be throw if the program is not running, which is fine as there could // be programs in the application that are currently not running. } waitForStopped(application.program(programRecord.getType(), programRecord.getName())); } } catch (NamespaceNotFoundException e) { // This can be safely ignore if the unit-test already deleted the namespace } catch (Exception e) { throw Throwables.propagate(e); } }