private Map<String, String> createFrameworkProperties() throws ExamConfigurationException { final Map<String, String> p = new HashMap<>(); CleanCachesOption cleanCaches = system.getOption(CleanCachesOption.class); if (cleanCaches != null && cleanCaches.getValue() != null && cleanCaches.getValue()) { p.put(FRAMEWORK_STORAGE_CLEAN, FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT); } p.put(FRAMEWORK_STORAGE, system.getTempFolder().getAbsolutePath()); p.put(FRAMEWORK_SYSTEMPACKAGES_EXTRA, join(system.getOptions(SystemPackageOption.class))); p.put(FRAMEWORK_BOOTDELEGATION, join(system.getOptions(BootDelegationOption.class))); for (FrameworkPropertyOption option : system.getOptions(FrameworkPropertyOption.class)) { p.put(option.getKey(), (String) option.getValue()); } if (LOG.isDebugEnabled()) { logFrameworkProperties(p); } return p; }
private int getStartLevel() throws ExamConfigurationException { FrameworkStartLevelOption startLevelOption = system.getOption(FrameworkStartLevelOption.class); return startLevelOption == null ? START_LEVEL_TEST_BUNDLE : startLevelOption.getStartLevel(); }
public WarProbeOption getLatestWarProbeOption() { try { return subsystems.peek().getOption(WarProbeOption.class); } catch (ExamConfigurationException e) { throw new TestContainerException(e.getMessage(), e); } } }
private void setFrameworkStartLevel() throws RemoteException, ExamConfigurationException { FrameworkStartLevelOption startLevelOption = system.getOption(FrameworkStartLevelOption.class); int startLevel = startLevelOption == null ? START_LEVEL_TEST_BUNDLE : startLevelOption .getStartLevel(); LOG.debug("Jump to startlevel [{}]", startLevel); long timeout = system.getTimeout().getValue(); boolean startLevelReached = remoteFramework.setFrameworkStartLevel(startLevel, timeout); if (!startLevelReached) { String msg = String.format("start level %d has not been reached within %d ms", startLevel, timeout); throw new TestContainerException(msg); } }