mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 09:46:16 +01:00
rename PluginCenterEvent
This commit is contained in:
@@ -27,4 +27,4 @@ package sonia.scm.plugin;
|
||||
import sonia.scm.event.Event;
|
||||
|
||||
@Event
|
||||
public class PluginCenterEvent {}
|
||||
public class PluginCenterErrorEvent {}
|
||||
@@ -61,7 +61,7 @@ class PluginCenterLoader {
|
||||
return mapper.map(pluginCenterDto);
|
||||
} catch (Exception ex) {
|
||||
LOG.error("failed to load plugins from plugin center, returning empty list", ex);
|
||||
eventBus.post(new PluginCenterEvent());
|
||||
eventBus.post(new PluginCenterErrorEvent());
|
||||
return Collections.emptySet();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,11 +79,11 @@ class PluginCenterLoaderTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void shouldThrowExceptionAndFirePluginCenterNotAvailableEvent() throws IOException {
|
||||
void shouldFirePluginCenterErrorEvent() throws IOException {
|
||||
when(client.get(PLUGIN_URL).request()).thenThrow(new IOException("failed to fetch"));
|
||||
|
||||
loader.load(PLUGIN_URL);
|
||||
|
||||
verify(eventBus).post(any(PluginCenterEvent.class));
|
||||
verify(eventBus).post(any(PluginCenterErrorEvent.class));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user