Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TP-1103 Add JMX support for shutterable and catchup services #56

Merged
merged 1 commit into from
Feb 18, 2019

Conversation

MartinYSpasov
Copy link
Contributor

No description provided.

@@ -11,6 +11,12 @@

<artifactId>subscription-manager</artifactId>

<properties>
<org.jboss.arquillian.junit.version>1.0.0.CR7</org.jboss.arquillian.junit.version>
<org.jboss.arquillian.spi.version>1.0.0.Alpha5</org.jboss.arquillian.spi.version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these properties needed?

<version>${test-utils.version}</version>
<scope>test</scope>
</dependency>
<groupId>org.mockito</groupId>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like there is an issue with the spacing from here onwards

}

@Test
public void shouldTrowExceptionWhenMBeanUnregisteringIncorrect() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

method name "Trow" should be "Throw"

}

@Test
public void shouldTrowExceptionWhenMBeanRegisteringIncorrect() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

method name "Trow" should be "Throw"

private static final String SHUTTERING_BEAN = "DefaultShutteringMBean";
private static final String CATCHUP_BEAN = "DefaultCatchupMBean";

private Map<Object, ObjectName> mbeanMap = createMBeanMap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can make this more extensible by injecting an object that contains the map of MBeans to register

@coveralls
Copy link

coveralls commented Feb 15, 2019

Pull Request Test Coverage Report for Build 436

  • 37 of 39 (94.87%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.09%) to 89.854%

Changes Missing Coverage Covered Lines Changed/Added Lines %
event-sourcing/subscription-manager/src/main/java/uk/gov/justice/services/event/sourcing/subscription/jmx/MBeanRegistry.java 6 8 75.0%
Totals Coverage Status
Change from base Build 396: 0.09%
Covered Lines: 1966
Relevant Lines: 2188

💛 - Coveralls

mbeanMap.put(DefaultCatchupMBean.class.newInstance(), new ObjectName(CATCHUP_DOMAIN_NAME, "type", CATCHUP_BEAN));

return mbeanMap;
} catch (final Exception exception) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be better to catch the actual Exceptions that are thrown rather than this catch all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants