Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlyn Normington2010-11-16 11:28:38 -0500
committerGlyn Normington2010-11-18 11:40:28 -0500
commit873d231b1b89b837a497833e1b3e68919e210ef0 (patch)
treebe9354fd83a18dc1754e77a2bfb2d2c70af63014 /org.eclipse.virgo.medic.integrationtest/src
parent974dcdf3c96ecb1c2eb82721f094e1f1c3099bdd (diff)
downloadorg.eclipse.virgo.medic-873d231b1b89b837a497833e1b3e68919e210ef0.tar.gz
org.eclipse.virgo.medic-873d231b1b89b837a497833e1b3e68919e210ef0.tar.xz
org.eclipse.virgo.medic-873d231b1b89b837a497833e1b3e68919e210ef0.zip
Begin upgrade to Equinox 3.7. Need to upgrade to Equinox config admin before continuing.
Diffstat (limited to 'org.eclipse.virgo.medic.integrationtest/src')
-rw-r--r--org.eclipse.virgo.medic.integrationtest/src/test/java/org/eclipse/virgo/medic/dump/test/DumpIntegrationTests.java9
-rw-r--r--org.eclipse.virgo.medic.integrationtest/src/test/java/org/eclipse/virgo/medic/eventlog/test/EventLogIntegrationTests.java15
-rw-r--r--org.eclipse.virgo.medic.integrationtest/src/test/resources/META-INF/MANIFEST.MF16
3 files changed, 18 insertions, 22 deletions
diff --git a/org.eclipse.virgo.medic.integrationtest/src/test/java/org/eclipse/virgo/medic/dump/test/DumpIntegrationTests.java b/org.eclipse.virgo.medic.integrationtest/src/test/java/org/eclipse/virgo/medic/dump/test/DumpIntegrationTests.java
index 1917ff0..5b84fd2 100644
--- a/org.eclipse.virgo.medic.integrationtest/src/test/java/org/eclipse/virgo/medic/dump/test/DumpIntegrationTests.java
+++ b/org.eclipse.virgo.medic.integrationtest/src/test/java/org/eclipse/virgo/medic/dump/test/DumpIntegrationTests.java
@@ -62,9 +62,10 @@ public class DumpIntegrationTests {
assertTrue(file.delete());
}
+ @SuppressWarnings("unchecked")
@Test
public void dumpGeneratorAvailableFromServiceRegistry() {
- ServiceReference serviceReference = this.bundleContext.getServiceReference(DumpGenerator.class.getName());
+ ServiceReference<DumpGenerator> serviceReference = (ServiceReference<DumpGenerator>)this.bundleContext.getServiceReference(DumpGenerator.class.getName());
assertNotNull(serviceReference);
}
@@ -141,6 +142,7 @@ public class DumpIntegrationTests {
}
+ @SuppressWarnings("unchecked")
@Test
public void logDumpEnabled() throws IOException, InterruptedException {
Configuration configuration = getConfiguration("org.eclipse.virgo.medic");
@@ -156,7 +158,7 @@ public class DumpIntegrationTests {
LoggerFactory.getLogger(getClass()).info("Test");
- ServiceReference serviceReference = this.bundleContext.getServiceReference(DumpGenerator.class.getName());
+ ServiceReference<DumpGenerator> serviceReference = (ServiceReference<DumpGenerator>)this.bundleContext.getServiceReference(DumpGenerator.class.getName());
DumpGenerator dumpGenerator = (DumpGenerator)this.bundleContext.getService(serviceReference);
dumpGenerator.generateDump("bleurgh");
@@ -177,8 +179,9 @@ public class DumpIntegrationTests {
return configurationAdmin.getConfiguration(pid);
}
+ @SuppressWarnings("unchecked")
private ConfigurationAdmin getConfigurationAdmin() {
- ServiceReference serviceReference = this.bundleContext.getServiceReference(ConfigurationAdmin.class.getName());
+ ServiceReference<ConfigurationAdmin> serviceReference = (ServiceReference<ConfigurationAdmin>)this.bundleContext.getServiceReference(ConfigurationAdmin.class.getName());
assertNotNull(serviceReference);
return (ConfigurationAdmin) this.bundleContext.getService(serviceReference);
diff --git a/org.eclipse.virgo.medic.integrationtest/src/test/java/org/eclipse/virgo/medic/eventlog/test/EventLogIntegrationTests.java b/org.eclipse.virgo.medic.integrationtest/src/test/java/org/eclipse/virgo/medic/eventlog/test/EventLogIntegrationTests.java
index 79f62f9..011fd33 100644
--- a/org.eclipse.virgo.medic.integrationtest/src/test/java/org/eclipse/virgo/medic/eventlog/test/EventLogIntegrationTests.java
+++ b/org.eclipse.virgo.medic.integrationtest/src/test/java/org/eclipse/virgo/medic/eventlog/test/EventLogIntegrationTests.java
@@ -52,21 +52,24 @@ public class EventLogIntegrationTests {
this.bundleContext.installBundle("file:src/test/resources/message-fragment");
}
+ @SuppressWarnings("unchecked")
@Test
public void availabilityOfEventLoggerFactory() {
- ServiceReference serviceReference = this.bundleContext.getServiceReference(EventLoggerFactory.class.getName());
+ ServiceReference<EventLoggerFactory> serviceReference = (ServiceReference<EventLoggerFactory>)this.bundleContext.getServiceReference(EventLoggerFactory.class.getName());
assertNotNull(serviceReference);
}
+ @SuppressWarnings("unchecked")
@Test
public void availabilityOfEventLogger() {
- ServiceReference serviceReference = this.bundleContext.getServiceReference(EventLogger.class.getName());
+ ServiceReference<EventLogger> serviceReference = (ServiceReference<EventLogger>)this.bundleContext.getServiceReference(EventLogger.class.getName());
assertNotNull(serviceReference);
}
+ @SuppressWarnings("unchecked")
@Test
public void eventLoggingWithMessageFromCurrentBundle() {
- ServiceReference serviceReference = this.bundleContext.getServiceReference(EventLogger.class.getName());
+ ServiceReference<EventLogger> serviceReference = (ServiceReference<EventLogger>)this.bundleContext.getServiceReference(EventLogger.class.getName());
assertNotNull(serviceReference);
EventLogger eventLogger = (EventLogger)this.bundleContext.getService(serviceReference);
eventLogger.log("1234", Level.WARNING, "orange", "lemon");
@@ -81,9 +84,10 @@ public class EventLogIntegrationTests {
}
+ @SuppressWarnings("unchecked")
@Test
public void eventLoggingWithMessageFromFragment() throws Exception {
- ServiceReference serviceReference = this.bundleContext.getServiceReference(EventLoggerFactory.class.getName());
+ ServiceReference<EventLoggerFactory> serviceReference = (ServiceReference<EventLoggerFactory>)this.bundleContext.getServiceReference(EventLoggerFactory.class.getName());
assertNotNull(serviceReference);
EventLoggerFactory eventLoggerFactory = (EventLoggerFactory)this.bundleContext.getService(serviceReference);
EventLogger eventLogger = eventLoggerFactory.createEventLogger(this.messageBundle);
@@ -98,9 +102,10 @@ public class EventLogIntegrationTests {
assertEquals("Shared oak and sycamore", loggingEvent.get(0).getMessage());
}
+ @SuppressWarnings("unchecked")
@Test
public void eventLoggingWithMessageFromSpecificBundle() throws Exception {
- ServiceReference serviceReference = this.bundleContext.getServiceReference(EventLoggerFactory.class.getName());
+ ServiceReference<EventLoggerFactory> serviceReference = (ServiceReference<EventLoggerFactory>)this.bundleContext.getServiceReference(EventLoggerFactory.class.getName());
assertNotNull(serviceReference);
EventLoggerFactory eventLoggerFactory = (EventLoggerFactory)this.bundleContext.getService(serviceReference);
EventLogger eventLogger = eventLoggerFactory.createEventLogger(this.messageBundle);
diff --git a/org.eclipse.virgo.medic.integrationtest/src/test/resources/META-INF/MANIFEST.MF b/org.eclipse.virgo.medic.integrationtest/src/test/resources/META-INF/MANIFEST.MF
index 11ab47e..697bbdd 100644
--- a/org.eclipse.virgo.medic.integrationtest/src/test/resources/META-INF/MANIFEST.MF
+++ b/org.eclipse.virgo.medic.integrationtest/src/test/resources/META-INF/MANIFEST.MF
@@ -1,23 +1,11 @@
Manifest-Version: 1.0
-Excluded-Import: ch.qos.logback.classic
-Tool: Bundlor 1.0.0.M6
+Tool: Bundlor 1.0.0.RELEASE
Bundle-Name: Medic Logging Integration Tests
Bundle-SymbolicName: org.eclipse.virgo.medic.log.test
Import-Package: ch.qos.logback.classic.spi,
ch.qos.logback.core,
- org.aspectj.lang;version="[1.6.6,2.0.0)",
- org.aspectj.lang.reflect;version="[1.6.6,2.0.0)",
- org.aspectj.runtime.internal;version="[1.6.6,2.0.0)",
- org.aspectj.runtime.reflect;version="[1.6.6,2.0.0)",
- org.eclipse.virgo.medic.dump;version="0",
- org.eclipse.virgo.medic.eventlog;version="0",
- org.eclipse.virgo.medic.log;version="0",
- org.eclipse.virgo.medic.log.appender;version="0",
- org.eclipse.virgo.test.framework,
- org.junit,
- org.junit.runner,
+ org.eclipse.virgo.medic.log;version="[2.2.0,2.3)",
org.osgi.framework;version=0,
- org.osgi.service.cm,
org.slf4j
Bundle-Version: 1.0.0
Bundle-ManifestVersion: 2

Back to the top