Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Not like this

View BaseKarafDefaultFrameworkDuplicatedPropertyEntryFromFileTest.java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
@Test
public void testConfiguration_shouldHaveWrittenTheLaterOne() throws Exception {
ServiceReference[] allServiceReferences = ctx.getAllServiceReferences(ConfigurationAdmin.class.getName(), null);
for (ServiceReference serviceReference : allServiceReferences) {
ConfigurationAdmin service = (ConfigurationAdmin) ctx.getService(serviceReference);
try {
org.osgi.service.cm.Configuration configuration = service.getConfiguration("tests");
assertEquals("myvalue2", configuration.getProperties().get("mykey"));
return;
} catch (Exception e) {
// continue
}
}
fail();
}

I like it when the code is both functional and self-critiquing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.