@Override public List<RuntimeTestResultEntry> runTest(Object objectUnderTest) { // Safe to cast as our accepts method will only return true for named clusters NamedCluster namedCluster = (NamedCluster) objectUnderTest; List<RuntimeTestResultEntry> clusterTestResultEntries = new ArrayList<>(); try { String activeConfigurationId = hadoopConfigurationBootstrap.getActiveConfigurationId(); hadoopConfigurationBootstrap.getProvider(); clusterTestResultEntries.add( new RuntimeTestResultEntryImpl( RuntimeTestEntrySeverity.INFO, messageGetter.getMessage(TEST_SHIM_LOAD_SHIM_LOADED_DESC, activeConfigurationId), messageGetter.getMessage(TEST_SHIM_LOAD_SHIM_LOADED_MESSAGE, activeConfigurationId))); } catch (NoShimSpecifiedException e) { clusterTestResultEntries.add( new RuntimeTestResultEntryImpl( RuntimeTestEntrySeverity.ERROR, messageGetter.getMessage(TEST_SHIM_LOAD_NO_SHIM_SPECIFIED_DESC), e.getMessage(), e)); } catch (ConfigurationException e) { clusterTestResultEntries.add( new RuntimeTestResultEntryImpl( RuntimeTestEntrySeverity.ERROR, messageGetter.getMessage(TEST_SHIM_LOAD_UNABLE_TO_LOAD_SHIM_DESC), e.getMessage(), e)); } return clusterTestResultEntries; }
public TestShimLoad(MessageGetterFactory messageGetterFactory) { this(messageGetterFactory, HadoopConfigurationBootstrap.getInstance()); }